mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
【修复】商城:取消订单,返回优惠劵时,状态校验不正确的问题
This commit is contained in:
parent
53db8309e9
commit
c1df35d305
@ -119,7 +119,7 @@ public class CouponServiceImpl implements CouponService {
|
||||
Integer status = LocalDateTimeUtils.beforeNow(coupon.getValidEndTime())
|
||||
? CouponStatusEnum.EXPIRE.getStatus() // 退还时可能已经过期了
|
||||
: CouponStatusEnum.UNUSED.getStatus();
|
||||
int updateCount = couponMapper.updateByIdAndStatus(id, CouponStatusEnum.UNUSED.getStatus(),
|
||||
int updateCount = couponMapper.updateByIdAndStatus(id, CouponStatusEnum.USED.getStatus(),
|
||||
new CouponDO().setStatus(status));
|
||||
if (updateCount == 0) {
|
||||
throw exception(COUPON_STATUS_NOT_USED);
|
||||
|
Loading…
Reference in New Issue
Block a user