|
|
|
@@ -629,6 +629,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
if(oldTakeRate == null || StringUtils.isBlank(oldTakeRate.getDouyinId())){ |
|
|
|
throw new MallinkException(ErrorCode.SYS_PARAMETER_ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
List<String> addDouyinIdList = new ArrayList<>(); |
|
|
|
addDouyinIdList.addAll(record.getDouyinIdList()); |
|
|
|
List<String> oldDouyinIdList = JSONObject.parseArray(oldTakeRate.getDouyinId(), String.class); |
|
|
|
@@ -645,8 +646,18 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
record.setDouyinId(null); |
|
|
|
record.setDouyinIdStatus(null); |
|
|
|
} |
|
|
|
|
|
|
|
if(EnumCpsPlanContentType.VIDEO.getCode().equals(record.getContentType())){ |
|
|
|
//当时间未改变时, |
|
|
|
if(record.getStartTime() == null || record.getStartTime().equals(oldTakeRate.getStartTime())){ |
|
|
|
record.setStartTime(null); |
|
|
|
} |
|
|
|
if(record.getEndTime() == null || record.getEndTime().equals(oldTakeRate.getEndTime())){ |
|
|
|
record.setEndTime(null); |
|
|
|
} |
|
|
|
record.setCommissionDuration(null);//佣金有效期不能修改 |
|
|
|
} |
|
|
|
record.setName(null);//名称不能修改 |
|
|
|
record.setCommissionDuration(null);//佣金有效期不能修改 |
|
|
|
}else{ |
|
|
|
poiPlan.setPlanName(record.getName()); |
|
|
|
poiPlan.setDouyinIdList(record.getDouyinIdList()); |
|
|
|
@@ -669,9 +680,13 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
if(EnumCpsPlanContentType.LIVE.getCode().equals(record.getContentType())){ |
|
|
|
returnPlanId = ttWebService.getPoiPlanService().poiOrientedPlanLiveSave(poiPlan); |
|
|
|
}else if(EnumCpsPlanContentType.VIDEO.getCode().equals(record.getContentType())){ |
|
|
|
poiPlan.setStartTime(record.getStartTime().getTime()/1000); |
|
|
|
poiPlan.setEndTime(record.getEndTime().getTime()/1000); |
|
|
|
if(poiPlan.getPlanId() == null){ |
|
|
|
if(record.getStartTime() != null){ |
|
|
|
poiPlan.setStartTime(record.getStartTime().getTime()/1000); |
|
|
|
} |
|
|
|
if(record.getEndTime() != null){ |
|
|
|
poiPlan.setEndTime(record.getEndTime().getTime()/1000); |
|
|
|
} |
|
|
|
if(record.getCommissionDuration() != null){ |
|
|
|
poiPlan.setCommissionDuration(record.getCommissionDuration()); |
|
|
|
} |
|
|
|
returnPlanId = ttWebService.getPoiPlanService().poiOrientedPlanVideoSave(poiPlan); |
|
|
|
|