From bdd1195d2050f611e19547918b1603a6c867fec7 Mon Sep 17 00:00:00 2001 From: paulGao Date: Thu, 23 Dec 2021 08:17:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=9E=B6=E5=95=86=E5=93=81=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/goods/serviceimpl/GoodsServiceImpl.java | 12 +++++++++--- .../order/cart/render/impl/SkuPromotionRender.java | 9 +++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java index 4bf76f61..da2f7b69 100644 --- a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java @@ -521,7 +521,9 @@ public class GoodsServiceImpl extends ServiceImpl implements private LambdaUpdateWrapper getUpdateWrapperByStoreAuthority() { LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); AuthUser authUser = this.checkStoreAuthority(); - updateWrapper.eq(Goods::getStoreId, authUser.getStoreId()); + if (authUser != null) { + updateWrapper.eq(Goods::getStoreId, authUser.getStoreId()); + } return updateWrapper; } @@ -563,7 +565,9 @@ public class GoodsServiceImpl extends ServiceImpl implements private LambdaUpdateWrapper getUpdateWrapperByManagerAuthority() { LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); AuthUser authUser = this.checkStoreAuthority(); - updateWrapper.eq(Goods::getStoreId, authUser.getStoreId()); + if (authUser != null) { + updateWrapper.eq(Goods::getStoreId, authUser.getStoreId()); + } return updateWrapper; } @@ -575,7 +579,9 @@ public class GoodsServiceImpl extends ServiceImpl implements private LambdaQueryWrapper getQueryWrapperByStoreAuthority() { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); AuthUser authUser = this.checkStoreAuthority(); - queryWrapper.eq(Goods::getStoreId, authUser.getStoreId()); + if (authUser != null) { + queryWrapper.eq(Goods::getStoreId, authUser.getStoreId()); + } return queryWrapper; } diff --git a/framework/src/main/java/cn/lili/modules/order/cart/render/impl/SkuPromotionRender.java b/framework/src/main/java/cn/lili/modules/order/cart/render/impl/SkuPromotionRender.java index adc4bc60..3302449e 100644 --- a/framework/src/main/java/cn/lili/modules/order/cart/render/impl/SkuPromotionRender.java +++ b/framework/src/main/java/cn/lili/modules/order/cart/render/impl/SkuPromotionRender.java @@ -144,16 +144,13 @@ public class SkuPromotionRender implements CartRenderStep { /** * 购物车促销类型 */ - private Boolean ignorePromotion(String promotionKey) { + private boolean ignorePromotion(String promotionKey) { // 忽略积分活动活动 忽略砍价活动 忽略优惠券活动 忽略拼团活动 - if (promotionKey.contains(PromotionTypeEnum.POINTS_GOODS.name()) + return promotionKey.contains(PromotionTypeEnum.POINTS_GOODS.name()) || promotionKey.contains(PromotionTypeEnum.KANJIA.name()) || promotionKey.contains(PromotionTypeEnum.COUPON.name()) - || promotionKey.contains(PromotionTypeEnum.PINTUAN.name())) { - return true; - } - return false; + || promotionKey.contains(PromotionTypeEnum.PINTUAN.name()); } }