From 04fdc70f582bc869495c07d8178c8732eaa64dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E8=B6=8A?= <552369664@qq.com> Date: Thu, 8 Aug 2024 14:13:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BC=98=E6=83=A0=E5=88=B8?= =?UTF-8?q?=E5=9B=9E=E6=94=B6=E5=90=8E=EF=BC=8C=E9=A2=86=E5=8F=96=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E5=92=8C=E5=89=A9=E4=BD=99=E6=95=B0=E9=87=8F=E4=B8=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/promotion/service/coupon/CouponServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponServiceImpl.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponServiceImpl.java index 1ce9d69593..82402d3f44 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponServiceImpl.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponServiceImpl.java @@ -140,8 +140,8 @@ public class CouponServiceImpl implements CouponService { if (deleteCount == 0) { throw exception(COUPON_DELETE_FAIL_USED); } - // 减少优惠劵模板的领取数量 -1 - couponTemplateService.updateCouponTemplateTakeCount(id, -1); + // 传入优惠券模板ID,减少优惠劵模板的领取数量 -1 + couponTemplateService.updateCouponTemplateTakeCount(couponMapper.selectById(id).getTemplateId(), -1); } @Override