Commit c1df35d3050e0f7f7bebbe5150536cdf7907d845
1 parent
53db8309
【修复】商城:取消订单,返回优惠劵时,状态校验不正确的问题
Showing
1 changed file
with
1 additions
and
1 deletions
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/coupon/CouponServiceImpl.java
| ... | ... | @@ -119,7 +119,7 @@ public class CouponServiceImpl implements CouponService { |
| 119 | 119 | Integer status = LocalDateTimeUtils.beforeNow(coupon.getValidEndTime()) |
| 120 | 120 | ? CouponStatusEnum.EXPIRE.getStatus() // 退还时可能已经过期了 |
| 121 | 121 | : CouponStatusEnum.UNUSED.getStatus(); |
| 122 | - int updateCount = couponMapper.updateByIdAndStatus(id, CouponStatusEnum.UNUSED.getStatus(), | |
| 122 | + int updateCount = couponMapper.updateByIdAndStatus(id, CouponStatusEnum.USED.getStatus(), | |
| 123 | 123 | new CouponDO().setStatus(status)); |
| 124 | 124 | if (updateCount == 0) { |
| 125 | 125 | throw exception(COUPON_STATUS_NOT_USED); | ... | ... |