...
|
...
|
@@ -119,6 +119,8 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ |
|
|
if(!checkSaveOrUpdateCouponParam(req)){
|
|
|
return new ApiResponse.ApiResponseBuilder().code(500).message("参数有误").build();
|
|
|
}
|
|
|
//TODO 每次更新必须更新该字段,否则我怎么判断是否更新该字段呢?productLimitType为1时,是否一定要设置该关联对象?
|
|
|
//TODO 若productLimitType=1时关联对象必填,则可用:req.getId()!=null && (req.getProductLimitType == 2 || req.getProductLimitValue()!=null)
|
|
|
if(req.getId() != null){
|
|
|
LOGGER.info("before saveOrUpdateCoupon#deleteByCouponId,couponId is {}",req.getId());
|
|
|
couponProductLimitMapper.deleteByCouponId(req.getId());
|
...
|
...
|
@@ -239,7 +241,7 @@ public class CouponServiceImpl implements ICouponService,IBusinessExportService{ |
|
|
for(Coupon coupon : coupons){
|
|
|
String useTime = com.yoho.ufo.util.DateUtil.int2DateStr(coupon.getStartTime(),"yyyy-MM-dd HH:mm:ss")+"至"+
|
|
|
com.yoho.ufo.util.DateUtil.int2DateStr(coupon.getEndTime(),"yyyy-MM-dd HH:mm:ss");
|
|
|
CouponQueryResp resp = new CouponQueryResp(coupon.getId(),coupon.getCouponName(),coupon.getCouponAmount(),
|
|
|
CouponQueryResp resp = new CouponQueryResp(coupon.getId(),coupon.getCouponName(),coupon.getCouponNum(),
|
|
|
useTime,coupon.getRemark(), Coupon.CouponStatusEnum.getKey(coupon.getStatus()),coupon.getStatus());
|
|
|
resps.add(resp);
|
|
|
}
|
...
|
...
|
|