From e46e620ea7afd8b18aa24dde8e3c9564355fa14f Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期日, 28 九月 2025 15:14:51 +0800
Subject: [PATCH] Merge branch 'send_coupon' into user_action
---
framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponClaimRecordServiceImpl.java | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponClaimRecordServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponClaimRecordServiceImpl.java
index 6a960c2..f759752 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponClaimRecordServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreCouponClaimRecordServiceImpl.java
@@ -201,7 +201,6 @@
storeCouponSingle.setClaimStatus(ClaimStatusEnum.CLAIM.name());
storeCouponSingle.setClaimUserId(userId);
storeCouponSingle.setClaimUserName(nickName);
- storeCouponSingleService.updateById(storeCouponSingle);
//鏍¢獙鏄惁鍦ㄥ崟鍝佸嵎绫婚鍙栬繃
LambdaQueryWrapper<StoreCoupon> storeCoupQuery = Wrappers.<StoreCoupon>lambdaQuery()
.eq(StoreCoupon::getId, storeCouponSingle.getStoreCoupRef()).last("FOR UPDATE");
@@ -213,8 +212,12 @@
throw new ServiceException("褰撳墠搴楅摵浼樻儬鍗风姸鎬佸紓甯�");
}
//棰嗗彇瀵瑰簲鐨勪紭鎯犲嵎鍐欏叆璁板綍
- memberCouponService.receiveCoupon(storeCouponSingle.getCouponId(),userId , nickName);
+ MemberCoupon memberCoupon = memberCouponService.receiveCoupon(storeCouponSingle.getCouponId(), userId, nickName);
+ String memberCouponId = memberCoupon.getId();
+ storeCouponSingle.setMemberCouponId(memberCouponId);
+ storeCouponSingleService.updateById(storeCouponSingle);
StoreCouponClaimRecord storeCouponClaimRecord = getStoreCouponClaimRecord(storeCouponSingle, userId);
+ storeCouponClaimRecord.setMemberCouponId(memberCouponId);
this.save(storeCouponClaimRecord);
LambdaUpdateWrapper<StoreCoupon> updateStoreCoupon = Wrappers.<StoreCoupon>lambdaUpdate().eq(StoreCoupon::getId, storeCoupon.getId())
.set(StoreCoupon::getCouponClaimNum, storeCoupon.getCouponClaimNum() + 1)
--
Gitblit v1.8.0