!87 修复管理员上下架商品报错问题

Merge pull request !87 from OceansDeep/feature/pg
This commit is contained in:
OceansDeep 2021-12-23 00:37:38 +00:00 committed by Gitee
commit f2e8d03f80
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());
}
}