Browse Source

调整品牌筛选类目idDAO方法,去除排序

wangyc 7 years ago
parent
commit
f6a5909268

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

@@ -89,12 +89,12 @@ public interface ComponentDao extends JpaSpecificationExecutor<Component>, JpaRe
 	public List<Component> findByCodes(@Param("codes") String[] codes);
 
 	/**
-	 * 根据器件的品牌id获取器件的类目列表,按器件数量倒序排序
+	 * 根据器件的品牌id获取器件的类目列表
 	 * 
 	 * @param brandId 品牌id
 	 * @return 器件信息
 	 */
-	@Query("select c.kindid from Component c where c.brandid = :brandId group by c.kindid order by count(c.kindid) desc")
+	@Query("select distinct c.kindid from Component c where c.brandid = :brandId")
 	public List<Long> findKindIdsByBrandId(@Param("brandId") Long brandId);
 
 	/**