Explorar el Código

修改爬虫库图片、规格书更新接口

wangyc hace 8 años
padre
commit
f193b9aa03

+ 2 - 2
src/main/java/com/uas/platform/b2c/prod/product/component/dao/ComponentCrawlDao.java

@@ -35,7 +35,7 @@ public interface ComponentCrawlDao extends JpaSpecificationExecutor<ComponentCra
 	 * @param task
 	 * @return
 	 */
-	@Query("select distinct c.img from ComponentCrawl c where c.task = :taskId")
+	@Query("select distinct c.img from ComponentCrawl c where c.task = :taskId and c.img is not null and c.b2cImg is null")
 	public List<String> findImgByTask(@Param("taskId") Long task);
 
 	/**
@@ -43,6 +43,6 @@ public interface ComponentCrawlDao extends JpaSpecificationExecutor<ComponentCra
 	 * @param task
 	 * @return
 	 */
-	@Query("select distinct c.attach from ComponentCrawl c where c.task = :taskId")
+	@Query("select distinct c.attach from ComponentCrawl c where c.task = :taskId and c.attach is not null and c.b2cAttach is null")
 	public List<String> findAttachByTask(@Param("taskId") Long task);
 }