分组
This commit is contained in:
@@ -254,17 +254,17 @@ public class ProductService {
|
|||||||
});
|
});
|
||||||
groupList.sort(Comparator.comparingInt(TbProductGroup::getIsSale).reversed());
|
groupList.sort(Comparator.comparingInt(TbProductGroup::getIsSale).reversed());
|
||||||
|
|
||||||
//热销
|
// //热销
|
||||||
TbProductGroup hot = new TbProductGroup();
|
// TbProductGroup hot = new TbProductGroup();
|
||||||
hot.setName("热销");
|
// hot.setName("热销");
|
||||||
List<TbProduct> hots = null;
|
// List<TbProduct> hots = null;
|
||||||
if (proSets.isEmpty()) {
|
// if (proSets.isEmpty()) {
|
||||||
hots = new ArrayList<>();
|
// hots = new ArrayList<>();
|
||||||
}else {
|
// }else {
|
||||||
hots = tbProductMapper.selectHot(shopId,proSets);
|
// hots = tbProductMapper.selectHot(shopId,proSets);
|
||||||
}
|
// }
|
||||||
hot.setProducts(handleDate(hots,true,1,false, shopInfo));
|
// hot.setProducts(handleDate(hots,true,1,false, shopInfo));
|
||||||
groupList.add(0, hot);
|
// groupList.add(0, hot);
|
||||||
|
|
||||||
concurrentMap.put("productInfo", groupList);
|
concurrentMap.put("productInfo", groupList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -244,6 +244,7 @@
|
|||||||
FROM
|
FROM
|
||||||
tb_product_group
|
tb_product_group
|
||||||
where shop_id=#{shopId} and is_show=1
|
where shop_id=#{shopId} and is_show=1
|
||||||
|
and product_ids != '[]'
|
||||||
<if test="groupId != null and groupId != ''">
|
<if test="groupId != null and groupId != ''">
|
||||||
and id = #{groupId}
|
and id = #{groupId}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user