fix: 优惠券使用数量不正确修改

This commit is contained in:
张松
2024-12-06 10:08:48 +08:00
parent df08828673
commit 1c585acfd1

View File

@@ -2089,6 +2089,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
TbActivateOutRecord tbActivateOutRecord = null;
if (!couponInfo.getFullReductionCouponMap().isEmpty()) {
TbUserCouponVo couponVo = couponInfo.getFullReductionCouponMap().values().stream().findFirst().orElse(null);
couponVo.setCurrentUseNum(BigDecimal.ONE);
finalAmount = finalAmount.subtract(couponVo.getDiscountAmount());
orderInfo.setFullCouponDiscountAmount(couponVo.getDiscountAmount());