...
|
...
|
@@ -3,6 +3,7 @@ package com.yoho.ufo.coupon.service.impl; |
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yoho.core.common.utils.DateUtil;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yoho.ufo.coupon.service.ICouponService;
|
|
|
import com.yoho.ufo.dal.CouponMapper;
|
|
|
import com.yoho.ufo.dal.CouponProductLimitMapper;
|
...
|
...
|
@@ -225,11 +226,11 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ |
|
|
Coupon coupon = couponMapper.selectById(req.getId());
|
|
|
if(coupon == null){
|
|
|
LOGGER.info("checkUpdateCouponParam failed! coupon is null.id is {}",req.getId());
|
|
|
return false;
|
|
|
throw new ServiceException(500,"修改失败,优惠券不存在");
|
|
|
}
|
|
|
if(coupon.getSendNum()>0){
|
|
|
LOGGER.info("checkUpdateCouponParam failed! coupon is using! sendNum is {}",coupon.getSendNum());
|
|
|
return false;
|
|
|
throw new ServiceException(500,"修改失败,优惠券已发放");
|
|
|
}
|
|
|
return true;
|
|
|
}
|
...
|
...
|
|