From 42e9ee06f453991b333a53972c4d0807e8aecb72 Mon Sep 17 00:00:00 2001 From: Chopper Date: Wed, 1 Sep 2021 14:49:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=EF=BC=8C=E8=B6=85=E5=87=BA=E5=BD=93=E5=89=8D=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E8=A2=AB=E6=B8=B2=E6=9F=93=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=8A=B6=E6=80=81=E5=92=8C=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=88=A4=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/lili/common/enums/PromotionTypeEnum.java | 7 +++---- .../promotion/serviceimpl/MemberCouponServiceImpl.java | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/framework/src/main/java/cn/lili/common/enums/PromotionTypeEnum.java b/framework/src/main/java/cn/lili/common/enums/PromotionTypeEnum.java index 3a121d81..0066632d 100644 --- a/framework/src/main/java/cn/lili/common/enums/PromotionTypeEnum.java +++ b/framework/src/main/java/cn/lili/common/enums/PromotionTypeEnum.java @@ -18,13 +18,12 @@ public enum PromotionTypeEnum { FULL_DISCOUNT("满减"), POINTS_GOODS("积分商品"), KANJIA("砍价"), - COUPON_ACTIVITY("优惠券活动") - ; + COUPON_ACTIVITY("优惠券活动"); /** - * 拼团秒杀拥有独立库存,如果其他促销也有独立库存涉及库存扣减的,请添加在下方 + * 有促销库存的活动类型 */ - static PromotionTypeEnum[] haveStockPromotion = new PromotionTypeEnum[]{PINTUAN, SECKILL, KANJIA}; + static PromotionTypeEnum[] haveStockPromotion = new PromotionTypeEnum[]{SECKILL, KANJIA, POINTS_GOODS}; private final String description; diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/MemberCouponServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/MemberCouponServiceImpl.java index 90ed9ce0..6a620c1c 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/MemberCouponServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/MemberCouponServiceImpl.java @@ -90,6 +90,9 @@ public class MemberCouponServiceImpl extends ServiceImpl getMemberCoupons() { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("member_id", UserContext.getCurrentUser().getId()); + queryWrapper.ge("member_coupon_status", MemberCouponStatusEnum.NEW.name()); + queryWrapper.ge("start_time", System.currentTimeMillis()); + queryWrapper.le("end_time", System.currentTimeMillis()); return this.list(queryWrapper); }