Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop

This commit is contained in:
Chopper 2021-12-23 11:58:53 +08:00
commit a3d2b84ecb
2 changed files with 12 additions and 9 deletions

View File

@ -521,7 +521,9 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
private LambdaUpdateWrapper<Goods> getUpdateWrapperByStoreAuthority() {
LambdaUpdateWrapper<Goods> 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<GoodsMapper, Goods> implements
private LambdaUpdateWrapper<Goods> getUpdateWrapperByManagerAuthority() {
LambdaUpdateWrapper<Goods> 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<GoodsMapper, Goods> implements
private LambdaQueryWrapper<Goods> getQueryWrapperByStoreAuthority() {
LambdaQueryWrapper<Goods> queryWrapper = new LambdaQueryWrapper<>();
AuthUser authUser = this.checkStoreAuthority();
queryWrapper.eq(Goods::getStoreId, authUser.getStoreId());
if (authUser != null) {
queryWrapper.eq(Goods::getStoreId, authUser.getStoreId());
}
return queryWrapper;
}

View File

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