|
|
@@ -561,6 +561,14 @@ public class LifeUserOrderService extends ServiceImpl<LifeUserOrderMapper, LifeU
|
|
|
lifeGroupBuyMainMapper.update(null, new LambdaUpdateWrapper<LifeGroupBuyMain>()
|
|
|
.setSql("inventory_num=inventory_num+" + refundCouponAmount)
|
|
|
.eq(LifeGroupBuyMain::getId, couponId));
|
|
|
+
|
|
|
+ //判断当前时间在开始时间start_date和结束时间end_date之间,并且库存single_qty大于0,则修改状态status为5
|
|
|
+ lifeGroupBuyMainMapper.update(null, new LambdaUpdateWrapper<LifeGroupBuyMain>()
|
|
|
+ .set(LifeGroupBuyMain::getStatus, 5)
|
|
|
+ .eq(LifeGroupBuyMain::getId, couponId)
|
|
|
+ .le(LifeGroupBuyMain::getStartTimeValue, LocalDateTime.now())
|
|
|
+ .ge(LifeGroupBuyMain::getEndTime, LocalDateTime.now())
|
|
|
+ .gt(LifeGroupBuyMain::getInventoryNum, 0));
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error("LifeUserOrderService,恢复团购券/代金券数量报错={}", e);
|