Browse Source

bugfix:退款,代金券/团购状态改变

lyx 1 tháng trước cách đây
mục cha
commit
4e9722217f

+ 2 - 4
alien-store/src/main/java/shop/alien/store/service/LifeUserOrderService.java

@@ -546,13 +546,11 @@ public class LifeUserOrderService extends ServiceImpl<LifeUserOrderMapper, LifeU
 
                 //判断当前时间在开始时间start_date和结束时间end_date之间,并且库存single_qty大于0,则修改状态status为5
                 lifeCouponMapper.update(null, new LambdaUpdateWrapper<LifeCoupon>()
-                        .set(LifeCoupon::getStatus, 5)
+                        .set(LifeCoupon::getStatus, CouponStatusEnum.ONGOING.getCode())
                         .eq(LifeCoupon::getId, couponId)
                         .le(LifeCoupon::getStartDate, LocalDateTime.now())
                         .ge(LifeCoupon::getEndDate, LocalDateTime.now())
                         .gt(LifeCoupon::getSingleQty, 0));
-
-
             } else {
                 // 团购信息
                 lifeGroupBuyMainMapper.update(null, new LambdaUpdateWrapper<LifeGroupBuyMain>()
@@ -561,7 +559,7 @@ public class LifeUserOrderService extends ServiceImpl<LifeUserOrderMapper, LifeU
 
                 //判断当前时间在开始时间start_date和结束时间end_date之间,并且库存single_qty大于0,则修改状态status为5
                 lifeGroupBuyMainMapper.update(null, new LambdaUpdateWrapper<LifeGroupBuyMain>()
-                        .set(LifeGroupBuyMain::getStatus, 5)
+                        .set(LifeGroupBuyMain::getStatus, CouponStatusEnum.ONGOING.getCode())
                         .eq(LifeGroupBuyMain::getId, couponId)
                         .le(LifeGroupBuyMain::getStartTimeValue, LocalDateTime.now())
                         .ge(LifeGroupBuyMain::getEndTime, LocalDateTime.now())