From b93d10eeea1b317f3a9b83f1037b54b9f83bfe12 Mon Sep 17 00:00:00 2001 From: paulGao Date: Thu, 13 Jan 2022 17:38:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BA=97=E9=93=BA=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E5=88=B8=E4=B8=BA=E9=83=A8=E5=88=86=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E3=80=82=E9=83=A8=E5=88=86=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E4=BD=BF=E7=94=A8=E4=BC=98=E6=83=A0=E5=88=B8?= =?UTF-8?q?=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/lili/modules/order/cart/service/CartServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/order/cart/service/CartServiceImpl.java b/framework/src/main/java/cn/lili/modules/order/cart/service/CartServiceImpl.java index 7d3e6539d..f6d0a46de 100644 --- a/framework/src/main/java/cn/lili/modules/order/cart/service/CartServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/order/cart/service/CartServiceImpl.java @@ -673,13 +673,13 @@ private List checkCoupon(MemberCoupon memberCoupon, TradeDTO tradeDTO return cartSkuVOS; } else if (memberCoupon.getScopeType().equals(PromotionsScopeTypeEnum.PORTION_GOODS_CATEGORY.name())) { //分类路径是否包含 - return cartSkuVOS.stream().filter(i -> i.getGoodsSku().getCategoryPath().indexOf("," + memberCoupon.getScopeId() + ",") <= 0).collect(Collectors.toList()); + return cartSkuVOS.stream().filter(i -> CharSequenceUtil.contains(memberCoupon.getScopeId(), i.getGoodsSku().getCategoryPath())).collect(Collectors.toList()); } else if (memberCoupon.getScopeType().equals(PromotionsScopeTypeEnum.PORTION_GOODS.name())) { //范围关联ID是否包含 return cartSkuVOS.stream().filter(i -> CharSequenceUtil.contains(memberCoupon.getScopeId(), i.getGoodsSku().getId())).collect(Collectors.toList()); } else if (memberCoupon.getScopeType().equals(PromotionsScopeTypeEnum.PORTION_SHOP_CATEGORY.name())) { //店铺分类路径是否包含 - return cartSkuVOS.stream().filter(i -> i.getGoodsSku().getStoreCategoryPath().indexOf("," + memberCoupon.getScopeId() + ",") <= 0).collect(Collectors.toList()); + return cartSkuVOS.stream().filter(i -> CharSequenceUtil.contains(memberCoupon.getScopeId(), i.getGoodsSku().getStoreCategoryPath())).collect(Collectors.toList()); } return new ArrayList<>(); }