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()); } }