소스 검색

调整获取图片不为空的器件信息方式

yujia 7 년 전
부모
커밋
3eff0685df
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/java/com/uas/platform/b2c/prod/product/component/dao/ComponentInfoDao.java

+ 1 - 1
src/main/java/com/uas/platform/b2c/prod/product/component/dao/ComponentInfoDao.java

@@ -80,7 +80,7 @@ public interface ComponentInfoDao extends JpaSpecificationExecutor<ComponentInfo
 	 * @param count 分页参数
 	 * @return 库存数量大于指定值的一页器件
 	 */
-	@Query(value = "select c from ComponentInfo c where c.img is not null limit (:count)")
+	@Query(value = "select * from product$component c where c.cmp_img is not null limit 0,:count", nativeQuery = true)
 	List<ComponentInfo> findByImgIsNotNull(@Param("count") Integer count);
 
 	/**