|
@@ -355,7 +355,8 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
if ("video".equalsIgnoreCase(videoInfo.getMaterialType())){
|
|
if ("video".equalsIgnoreCase(videoInfo.getMaterialType())){
|
|
//视频类型
|
|
//视频类型
|
|
//1-竖版视频 2-横版视频
|
|
//1-竖版视频 2-横版视频
|
|
- String imageMode = videoInfo.getType() == 1 ? "CREATIVE_IMAGE_MODE_VIDEO_VERTICAL" : "CREATIVE_IMAGE_MODE_VIDEO";
|
|
|
|
|
|
+// String imageMode = videoInfo.getType() == 1 ? "CREATIVE_IMAGE_MODE_VIDEO_VERTICAL" : "CREATIVE_IMAGE_MODE_VIDEO";
|
|
|
|
+ String imageMode = strategy.getCreativeImageMode();
|
|
imageObject.put("image_mode",imageMode);
|
|
imageObject.put("image_mode",imageMode);
|
|
imageObject.put("video_id",videoInfo.getVid());
|
|
imageObject.put("video_id",videoInfo.getVid());
|
|
//获取视频封面id
|
|
//获取视频封面id
|
|
@@ -365,7 +366,8 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
}
|
|
}
|
|
}else if ("image".equalsIgnoreCase(videoInfo.getMaterialType())){
|
|
}else if ("image".equalsIgnoreCase(videoInfo.getMaterialType())){
|
|
//1-大图横图; 2-大图竖图
|
|
//1-大图横图; 2-大图竖图
|
|
- String imageMode = videoInfo.getType() == 1 ? "CREATIVE_IMAGE_MODE_LARGE" : "CREATIVE_IMAGE_MODE_LARGE_VERTICAL";
|
|
|
|
|
|
+// String imageMode = videoInfo.getType() == 1 ? "CREATIVE_IMAGE_MODE_LARGE" : "CREATIVE_IMAGE_MODE_LARGE_VERTICAL";
|
|
|
|
+ String imageMode = strategy.getCreativeImageMode();
|
|
imageObject.put("image_mode",imageMode);
|
|
imageObject.put("image_mode",imageMode);
|
|
imageObject.put("image_ids",new String[]{videoInfo.getId()});
|
|
imageObject.put("image_ids",new String[]{videoInfo.getId()});
|
|
}
|
|
}
|
|
@@ -374,6 +376,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
params.put("image_list",imageArray);
|
|
params.put("image_list",imageArray);
|
|
JSONArray titleArray = new JSONArray();
|
|
JSONArray titleArray = new JSONArray();
|
|
List<BytedanceVideoSlogenInfo> slogenInfos = slogenInfoService.listByParams(videoInfo.getSignature(),1);
|
|
List<BytedanceVideoSlogenInfo> slogenInfos = slogenInfoService.listByParams(videoInfo.getSignature(),1);
|
|
|
|
+ //使用指定文案
|
|
if(!Check.isNull(slogenInfos)){
|
|
if(!Check.isNull(slogenInfos)){
|
|
for (BytedanceVideoSlogenInfo slogenInfo:slogenInfos) {
|
|
for (BytedanceVideoSlogenInfo slogenInfo:slogenInfos) {
|
|
if(titleArray.size() >= 10){ //接口中是要求一个视频最多10个标题
|
|
if(titleArray.size() >= 10){ //接口中是要求一个视频最多10个标题
|
|
@@ -391,6 +394,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
titleArray.add(titleObject);
|
|
titleArray.add(titleObject);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // 指定文案不够的时候 使用通用文案
|
|
for(int i = 0; i < 3; i++){
|
|
for(int i = 0; i < 3; i++){
|
|
if(titleArray.size() >= 10){
|
|
if(titleArray.size() >= 10){
|
|
break;
|
|
break;
|
|
@@ -408,9 +412,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
}
|
|
}
|
|
titleArray.add(titleObject);
|
|
titleArray.add(titleObject);
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
if(!Check.isNull(titleArray)){
|
|
if(!Check.isNull(titleArray)){
|
|
params.put("title_list",titleArray);
|
|
params.put("title_list",titleArray);
|
|
}
|
|
}
|