This commit is contained in:
2024-11-23 10:12:39 +08:00
parent a2b9f98ea1
commit 4e922fc3be
2 changed files with 12 additions and 11 deletions

View File

@@ -254,17 +254,17 @@ public class ProductService {
});
groupList.sort(Comparator.comparingInt(TbProductGroup::getIsSale).reversed());
//热销
TbProductGroup hot = new TbProductGroup();
hot.setName("热销");
List<TbProduct> hots = null;
if (proSets.isEmpty()) {
hots = new ArrayList<>();
}else {
hots = tbProductMapper.selectHot(shopId,proSets);
}
hot.setProducts(handleDate(hots,true,1,false, shopInfo));
groupList.add(0, hot);
// //热销
// TbProductGroup hot = new TbProductGroup();
// hot.setName("热销");
// List<TbProduct> hots = null;
// if (proSets.isEmpty()) {
// hots = new ArrayList<>();
// }else {
// hots = tbProductMapper.selectHot(shopId,proSets);
// }
// hot.setProducts(handleDate(hots,true,1,false, shopInfo));
// groupList.add(0, hot);
concurrentMap.put("productInfo", groupList);
}

View File

@@ -244,6 +244,7 @@
FROM
tb_product_group
where shop_id=#{shopId} and is_show=1
and product_ids != '[]'
<if test="groupId != null and groupId != ''">
and id = #{groupId}
</if>