From f1e88066e0af2a0852fe1095da87c04018c9cf5a Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 11 Sep 2023 18:11:05 +0800
Subject: [PATCH] 优惠卷
---
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
index eac3182..3b9cc1d 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -312,6 +312,12 @@
if(1 != skuResult){
throw new FebsException(sku.getSkuName() + "库存不足");
}
+ Long memberCouponId = mallOrderItem.getMemberCouponId();
+ MallMemberCoupon mallMemberCoupon = mallMemberCouponMapper.selectById(memberCouponId);
+ if(ObjectUtil.isNotEmpty(mallMemberCoupon)){
+ mallMemberCoupon.setState(1);
+ mallMemberCouponMapper.updateById(mallMemberCoupon);
+ }
}
}
--
Gitblit v1.9.1