From cfb70eff8a269162055d1ac014f05f9d4e62f051 Mon Sep 17 00:00:00 2001 From: misworga831 Date: Tue, 24 Oct 2023 08:27:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=E5=87=BA=E7=8E=B0=E7=9A=84=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=95=B0=E6=8D=AE=E6=97=A0=E5=95=86=E5=93=81=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E6=9F=A5=E8=AF=A2=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../promotion/serviceimpl/PromotionGoodsServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java index 03f36a304..ee4e41d50 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionGoodsServiceImpl.java @@ -1,5 +1,6 @@ package cn.lili.modules.promotion.serviceimpl; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.convert.Convert; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.json.JSONObject; @@ -109,7 +110,7 @@ public class PromotionGoodsServiceImpl extends ServiceImpl i.or(j -> j.in(SKU_ID_COLUMN, skuIds)) .or(n -> n.eq("scope_type", PromotionsScopeTypeEnum.ALL.name())) .or(n -> n.and(k -> k.eq("scope_type", PromotionsScopeTypeEnum.PORTION_GOODS_CATEGORY.name()) - .and(l -> l.in("scope_id", categoriesPath))))); + .and(l -> l.in(CollUtil.isNotEmpty(categoriesPath), "scope_id", categoriesPath))))); queryWrapper.and(i -> i.or(PromotionTools.queryPromotionStatus(PromotionsStatusEnum.START)).or(PromotionTools.queryPromotionStatus(PromotionsStatusEnum.NEW))); return this.list(queryWrapper); }