|
@@ -63,6 +63,9 @@ public class SysCouponServiceImpl extends BaseServiceImpl<Integer, SysCoupon> i
|
|
|
oldCoupon.setStockCount(sysCoupon.getStockCount());
|
|
|
oldCoupon.setWarningStockNum(sysCoupon.getWarningStockNum());
|
|
|
}
|
|
|
+ if(oldCoupon.getStockCount()==-1){
|
|
|
+ oldCoupon.setWarningStockNum(-1);
|
|
|
+ }
|
|
|
oldCoupon.setStatus(sysCoupon.getStatus());
|
|
|
if(oldCoupon.getStockCount()-oldCoupon.getConsumeNum()>oldCoupon.getWarningStockNum()){
|
|
|
oldCoupon.setWarningStatus(0);
|
|
@@ -104,6 +107,9 @@ public class SysCouponServiceImpl extends BaseServiceImpl<Integer, SysCoupon> i
|
|
|
default:
|
|
|
throw new BizException("请指定有效期类型");
|
|
|
}
|
|
|
+ if(sysCoupon.getStockCount()==-1){
|
|
|
+ sysCoupon.setWarningStockNum(-1);
|
|
|
+ }
|
|
|
sysCouponDao.update(sysCoupon);
|
|
|
}
|
|
|
}
|