|
|
|
@@ -663,6 +663,9 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
if(oldTakeRate == null || StringUtils.isBlank(oldTakeRate.getDouyinId())){ |
|
|
|
throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR); |
|
|
|
} |
|
|
|
if(!EnumCpsPlanStatus.ING.getCode().equals(oldTakeRate.getStatus())){ |
|
|
|
throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"该计划已取消或已完成"); |
|
|
|
} |
|
|
|
|
|
|
|
List<String> addDouyinIdList = new ArrayList<>(); |
|
|
|
addDouyinIdList.addAll(record.getDouyinIdList()); |
|
|
|
@@ -682,6 +685,13 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
} |
|
|
|
|
|
|
|
if(EnumCpsPlanContentType.VIDEO.getCode().equals(record.getContentType())){ |
|
|
|
//当时间改变时, |
|
|
|
if(record.getStartTime() != null && record.getStartTime().after(oldTakeRate.getStartTime())){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"开始时间只能向前修改"); |
|
|
|
} |
|
|
|
if(record.getEndTime() != null && record.getEndTime().before(oldTakeRate.getEndTime())){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"结束时间只能向后延长"); |
|
|
|
} |
|
|
|
//当时间未改变时, |
|
|
|
if(record.getStartTime() == null || record.getStartTime().equals(oldTakeRate.getStartTime())){ |
|
|
|
record.setStartTime(null); |
|
|
|
|