|
@@ -1210,6 +1210,15 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
|
|
|
return split[i];
|
|
|
}
|
|
|
|
|
|
+ public static String getDescription(String description) {
|
|
|
+ if (Check.isNull(description)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ JSONArray descArr = JSONArray.parseArray(description);
|
|
|
+ int i = getrandom(0, descArr.size() - 1);
|
|
|
+ return descArr.getString(i);
|
|
|
+ }
|
|
|
+
|
|
|
private Long getBidByString(String cpaBid) {
|
|
|
if (Check.isNull(cpaBid)) {
|
|
|
return null;
|
|
@@ -1240,6 +1249,7 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
|
|
|
if ((null != cutFrameList && !cutFrameList.isEmpty())) {
|
|
|
for (int i = 0; i < cutFrameList.size(); i++) {
|
|
|
creativeParams.put("action_bar_text", getActionBar(strategy.getActionBarText()));
|
|
|
+ creativeParams.put("description", getDescription(strategy.getDescription()));
|
|
|
String imageCode = cutFrameList.get(i).getSignature();
|
|
|
String imageUrl = cutFrameList.get(i).getUrl();
|
|
|
String imageToken = getImageToken(imageUrl, imageCode, token.getAccountId(), token.getAccessToken());
|
|
@@ -1272,10 +1282,6 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
|
|
|
creativeParams.put("unit_id", unitId);
|
|
|
creativeParams.put("photo_id", videoItem.getPhotoId());
|
|
|
creativeParams.put("creative_material_type", videoItem.getMaterialType());
|
|
|
- JSONArray descArr = JSONArray.parseArray(strategy.getDescription());
|
|
|
- int index = new Random().nextInt(descArr.size());
|
|
|
- String description = descArr.getString(index);
|
|
|
- creativeParams.put("description", description);
|
|
|
// 封面广告语标题
|
|
|
if (!Check.isNull(strategy.getStickerTitle())) {
|
|
|
creativeParams.put("sticker_title", strategy.getStickerTitle());
|