diff --git a/buyer-api/src/main/java/cn/lili/controller/promotion/CouponBuyerController.java b/buyer-api/src/main/java/cn/lili/controller/promotion/CouponBuyerController.java index e505cb586..885743745 100644 --- a/buyer-api/src/main/java/cn/lili/controller/promotion/CouponBuyerController.java +++ b/buyer-api/src/main/java/cn/lili/controller/promotion/CouponBuyerController.java @@ -64,6 +64,9 @@ public class CouponBuyerController { @GetMapping("/activity") @ApiOperation(value = "自动领取优惠券") public ResultMessage> activity() { + if (UserContext.getCurrentUser() == null) { + return ResultUtil.success(); + } return ResultUtil.data(couponActivityService.trigger( CouponActivityTrigger.builder() .couponActivityTypeEnum(CouponActivityTypeEnum.AUTO_COUPON) diff --git a/framework/src/main/java/cn/lili/modules/promotion/entity/dto/search/BasePromotionsSearchParams.java b/framework/src/main/java/cn/lili/modules/promotion/entity/dto/search/BasePromotionsSearchParams.java index 0131aa3e3..ad45aba4f 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/entity/dto/search/BasePromotionsSearchParams.java +++ b/framework/src/main/java/cn/lili/modules/promotion/entity/dto/search/BasePromotionsSearchParams.java @@ -71,7 +71,11 @@ public class BasePromotionsSearchParams { queryWrapper.eq("scope_type", scopeType); } if (CharSequenceUtil.isNotEmpty(storeId)) { - queryWrapper.in("store_id", Arrays.asList(storeId.split(","))); + if ("store".equals(storeId)) { + queryWrapper.ne("store_id", PromotionTools.PLATFORM_ID); + } else { + queryWrapper.in("store_id", Arrays.asList(storeId.split(","))); + } } queryWrapper.eq("delete_flag", false); return queryWrapper; diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillServiceImpl.java index c9c7fba50..c9cef67aa 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/SeckillServiceImpl.java @@ -245,6 +245,9 @@ public class SeckillServiceImpl extends AbstractPromotionsServiceImpl