|
|
@@ -552,6 +552,16 @@ public class LifeUserOrderService extends ServiceImpl<LifeUserOrderMapper, LifeU
|
|
|
lifeCouponMapper.update(null, new LambdaUpdateWrapper<LifeCoupon>()
|
|
|
.setSql("single_qty=single_qty+" + refundCouponAmount)
|
|
|
.eq(LifeCoupon::getId, couponId));
|
|
|
+
|
|
|
+ //判断当前时间在开始时间start_date和结束时间end_date之间,并且库存single_qty大于0,则修改状态status为5
|
|
|
+ lifeCouponMapper.update(null, new LambdaUpdateWrapper<LifeCoupon>()
|
|
|
+ .set(LifeCoupon::getStatus, 5)
|
|
|
+ .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>()
|