From 14b3dd223d4a148a4ca681a5c542901dfe74f029 Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期五, 26 九月 2025 17:49:08 +0800 Subject: [PATCH] 店铺优惠卷调整 --- framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponServiceImpl.java | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponServiceImpl.java index cf3782d..d385e0f 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponServiceImpl.java @@ -159,7 +159,7 @@ public Result addStoreCoupon(StoreCouponForm storeCoupon) { StoreCoupon entity = StoreCouponForm.getEntityByForm(storeCoupon, null); entity.setStatus(StoreCouponStausEnum.ENABLE.name()); - entity.setCouponClaimNum(storeCoupon.getCouponNum()); + entity.setCouponClaimNum(0); entity.setGenerateStatus(GenerateCouponStausEnum.NOT_GENERATE.name()); Coupon coupon = couponService.getById(entity.getCouponId()); Integer publishNum = coupon.getPublishNum(); @@ -212,6 +212,13 @@ redissonLock.unlock(); } } + @Override + public void afterCompletion(int status) { + // 纭繚鍗充娇鍦ㄤ簨鍔″洖婊氱殑鎯呭喌涓嬩篃鑳介噴鏀鹃攣 + if (redissonLock.isHeldByCurrentThread()) { + redissonLock.unlock(); + } + } }); } } -- Gitblit v1.8.0