Browse Source

//plan

release_toaliyun_real
xhxu 3 years ago
parent
commit
51f87adab9
1 changed files with 19 additions and 4 deletions
  1. +19
    -4
      mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java

+ 19
- 4
mallinkService/src/main/java/com/iformall/service/impl/TtCouponGoodsServiceImpl.java View File

@@ -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);


Loading…
Cancel
Save