From 4e922fc3be44c500d9dc2741437b13d55615c09a Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Sat, 23 Nov 2024 10:12:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/ProductService.java | 22 +++++++++---------- .../resources/mapper/TbProductGroupMapper.xml | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java index 096ca52..0f00642 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java @@ -254,17 +254,17 @@ public class ProductService { }); groupList.sort(Comparator.comparingInt(TbProductGroup::getIsSale).reversed()); - //热销 - TbProductGroup hot = new TbProductGroup(); - hot.setName("热销"); - List 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 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); } diff --git a/src/main/resources/mapper/TbProductGroupMapper.xml b/src/main/resources/mapper/TbProductGroupMapper.xml index 4bd40bf..51bbae2 100644 --- a/src/main/resources/mapper/TbProductGroupMapper.xml +++ b/src/main/resources/mapper/TbProductGroupMapper.xml @@ -244,6 +244,7 @@ FROM tb_product_group where shop_id=#{shopId} and is_show=1 + and product_ids != '[]' and id = #{groupId}