浏览代码

处理BUG1235

lt 1 月之前
父节点
当前提交
abc00e44bc
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      alien-store/src/main/java/shop/alien/store/service/impl/LifeCouponServiceImpl.java

+ 1 - 2
alien-store/src/main/java/shop/alien/store/service/impl/LifeCouponServiceImpl.java

@@ -141,9 +141,8 @@ public class LifeCouponServiceImpl extends ServiceImpl<LifeCouponMapper, LifeCou
         IPage<LifeCoupon> lifeCouponIPage = new Page<>(page, size);
         //如果singleQty 库存的数量<=0,则修改status状态为已售罄 状态为4
         LifeCoupon lifeCouponNew = new LifeCoupon();
-        lifeCouponNew.setStoreId(storeId);
         lifeCouponNew.setStatus(4);
-        lifeCouponMapper.update(lifeCouponNew, new LambdaUpdateWrapper<LifeCoupon>().eq(LifeCoupon::getSingleQty, 0));
+        lifeCouponMapper.update(lifeCouponNew, new LambdaUpdateWrapper<LifeCoupon>().eq(LifeCoupon::getSingleQty, 0).eq(LifeCoupon::getStoreId, storeId));
         //如果当前时间小于开始时间,则修改status状态为未开始 状态为2
 //        LifeCoupon lifeCouponNew1 = new LifeCoupon();
 //        lifeCouponNew1.setStoreId(storeId);