From 8b61d40ff8ad81ea38d50d495b39b42bf244e8de Mon Sep 17 00:00:00 2001 From: misworga831 Date: Mon, 16 Oct 2023 18:34:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E5=88=9D=E5=A7=8B=E5=8C=96=E5=8F=8A?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/lili/controller/promotion/CouponBuyerController.java | 3 +++ .../entity/dto/search/BasePromotionsSearchParams.java | 6 +++++- .../modules/promotion/serviceimpl/SeckillServiceImpl.java | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) 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