|
|
@@ -1,5 +1,6 @@
|
|
|
package shop.alien.store.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
@@ -136,6 +137,11 @@ public class LifeCouponServiceImpl extends ServiceImpl<LifeCouponMapper, LifeCou
|
|
|
wrapper.eq(LifeCoupon::getDataType, dataType);
|
|
|
wrapper.orderByDesc(LifeCoupon::getCreatedTime);
|
|
|
IPage<LifeCoupon> lifeCouponIPage = new Page<>(page, size);
|
|
|
+ //如果singleQty的数量<=0,则修改status状态为已结束
|
|
|
+ LifeCoupon lifeCouponNew = new LifeCoupon();
|
|
|
+ lifeCouponNew.setStoreId(storeId);
|
|
|
+ lifeCouponNew.setStatus(4);
|
|
|
+ lifeCouponMapper.update(lifeCouponNew, new LambdaUpdateWrapper<LifeCoupon>().eq(LifeCoupon::getSingleQty, 0));
|
|
|
return lifeCouponMapper.selectPage(lifeCouponIPage, wrapper);
|
|
|
}
|
|
|
|