|
@@ -158,6 +158,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
JSONObject creativeParams = getCreativeParams(strategy,adId,video,token);
|
|
|
log.info("账户id:{};创意创建参数:{}",strategy.getAccountId(),creativeParams);
|
|
|
JSONObject creativeObject = marketingService.creativeCreate(token,adId,creativeParams);
|
|
|
+ log.info("创建创意=====》》》》》》{}",creativeObject);
|
|
|
if(null!=creativeObject.getInteger("code")&&creativeObject.getInteger("code")!=0){
|
|
|
List<Long> adIds = new ArrayList<>();
|
|
|
adIds.add(adId);
|
|
@@ -382,16 +383,16 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
JSONObject titleObject = new JSONObject();
|
|
|
titleObject.put("title",slogenInfo.getSlogan());
|
|
|
String creativeWordsIds = slogenInfo.getCreativeWordIds();
|
|
|
+ JSONArray wordsArr = new JSONArray();
|
|
|
if(null!=creativeWordsIds&&!creativeWordsIds.trim().equals("")){
|
|
|
JSONArray creativeWordsArray = JSON.parseArray(creativeWordsIds);
|
|
|
- if(null!=creativeWordsArray&&!creativeWordsArray.isEmpty()){
|
|
|
for (Object creative : creativeWordsArray) {
|
|
|
JSONObject creativeObject = new JSONObject();
|
|
|
creativeObject.put("word_id",creative);
|
|
|
- creativeWordsArray.add(creativeObject);
|
|
|
+ wordsArr.add(creativeObject);
|
|
|
}
|
|
|
- titleObject.put("word_list",creativeWordsArray);
|
|
|
- }
|
|
|
+ titleObject.put("word_list",wordsArr);
|
|
|
+
|
|
|
}
|
|
|
titleArray.add(titleObject);
|
|
|
}
|
|
@@ -407,17 +408,20 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
}
|
|
|
JSONObject titleObject = new JSONObject();
|
|
|
titleObject.put("title",byteDanceGeneralCopywriter.get(i).getTextCopywriter());
|
|
|
+
|
|
|
String creativeWordsIds = byteDanceGeneralCopywriter.get(i).getCreativeWordIds();
|
|
|
- if(null!=creativeWordsIds&&!creativeWordsIds.trim().equals("")){
|
|
|
+
|
|
|
+ JSONArray wordsArr = new JSONArray();
|
|
|
+
|
|
|
+ if(null != creativeWordsIds && !creativeWordsIds.trim().equals("")){
|
|
|
JSONArray creativeWordsArray = JSON.parseArray(creativeWordsIds);
|
|
|
- if(null!=creativeWordsArray && !creativeWordsArray.isEmpty()){
|
|
|
for (Object creative : creativeWordsArray) {
|
|
|
JSONObject creativeObject = new JSONObject();
|
|
|
creativeObject.put("word_id",creative);
|
|
|
- creativeWordsArray.add(creativeObject);
|
|
|
+ wordsArr.add(creativeObject);
|
|
|
}
|
|
|
- titleObject.put("word_list",creativeWordsArray);
|
|
|
- }
|
|
|
+ titleObject.put("word_list",wordsArr);
|
|
|
+
|
|
|
}
|
|
|
titleArray.add(titleObject);
|
|
|
}
|
|
@@ -433,13 +437,14 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
String creativeWordsIds = byteDanceGeneralCopywriter.getCreativeWordIds();
|
|
|
if(null!=creativeWordsIds&&!creativeWordsIds.trim().equals("")){
|
|
|
JSONArray creativeWordsArray = JSON.parseArray(creativeWordsIds);
|
|
|
+ JSONArray wordsArr = new JSONArray();
|
|
|
if(null!=creativeWordsArray&&!creativeWordsArray.isEmpty()){
|
|
|
for (Object creative : creativeWordsArray) {
|
|
|
JSONObject creativeObject = new JSONObject();
|
|
|
creativeObject.put("word_id",creative);
|
|
|
- creativeWordsArray.add(creativeObject);
|
|
|
+ wordsArr.add(creativeObject);
|
|
|
}
|
|
|
- titleObject.put("word_list",creativeWordsArray);
|
|
|
+ titleObject.put("word_list",wordsArr);
|
|
|
}
|
|
|
}
|
|
|
titleArray.add(titleObject);
|
|
@@ -474,6 +479,7 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
//视频
|
|
|
object.put("image_mode",strategy.getCreativeImageMode());
|
|
|
JSONObject videoObj = new JSONObject();
|
|
|
+ videoObj.put("video_id",videoInfo.getVid());
|
|
|
//视频封面
|
|
|
JSONObject imgObj = new JSONObject();
|
|
|
//获取视频封面id
|