|
@@ -1041,24 +1041,32 @@ public class BatchServiceImpl implements IBatchService {
|
|
creativeJson.put("advertiser_id", accountId);
|
|
creativeJson.put("advertiser_id", accountId);
|
|
creativeJson.put("unit_id", unitId);
|
|
creativeJson.put("unit_id", unitId);
|
|
|
|
|
|
- // 素材类型
|
|
|
|
- if (!Check.isNull(creative.getCreativeMaterialType())) {
|
|
|
|
- creativeJson.put("creative_material_type", creative.getCreativeMaterialType());
|
|
|
|
|
|
+
|
|
|
|
+ if (Check.isNull(creative.getCreativeMaterialType())) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ creativeJson.put("creative_material_type", creative.getCreativeMaterialType());
|
|
|
|
+ if (creative.getCreativeMaterialType() == 4) {
|
|
|
|
+ creativeJson.put("image_tokens", JSONArray.parseArray(creative.getImageTokens()));
|
|
|
|
+ creativeJson.put("short_slogan", creative.getShortSlogan());
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ String photo_id = creative.getPhotoId();
|
|
|
|
+ creativeJson.put("photo_id", photo_id);
|
|
|
|
+ String image = creative.getImageToken();
|
|
|
|
+ creativeJson.put("image_token", image);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
String action_bar_text = creative.getActionBarText();
|
|
String action_bar_text = creative.getActionBarText();
|
|
- // 视频id
|
|
|
|
String click_track_url = creative.getClickTrackUrl();
|
|
String click_track_url = creative.getClickTrackUrl();
|
|
JSONArray successArr = new JSONArray();
|
|
JSONArray successArr = new JSONArray();
|
|
JSONArray failArr = new JSONArray();
|
|
JSONArray failArr = new JSONArray();
|
|
String description = creative.getDescription();
|
|
String description = creative.getDescription();
|
|
- String photo_id = creative.getPhotoId();
|
|
|
|
- String image = creative.getImageToken();
|
|
|
|
String name = creative.getCreativeName();
|
|
String name = creative.getCreativeName();
|
|
creativeJson.put("action_bar_text", action_bar_text);
|
|
creativeJson.put("action_bar_text", action_bar_text);
|
|
creativeJson.put("description", description.trim());
|
|
creativeJson.put("description", description.trim());
|
|
- creativeJson.put("image_token", image);
|
|
|
|
creativeJson.put("creative_name", name);
|
|
creativeJson.put("creative_name", name);
|
|
- creativeJson.put("photo_id", photo_id);
|
|
|
|
creativeJson.put("click_track_url", click_track_url);
|
|
creativeJson.put("click_track_url", click_track_url);
|
|
|
|
|
|
//封面广告语标题
|
|
//封面广告语标题
|
|
@@ -1087,10 +1095,7 @@ public class BatchServiceImpl implements IBatchService {
|
|
creativeJson.put("site_id", creative.getSiteId());
|
|
creativeJson.put("site_id", creative.getSiteId());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
// 安卓下载中间页
|
|
// 安卓下载中间页
|
|
-
|
|
|
|
-
|
|
|
|
Map<String, Object> returnCreativeMap = kuaishouInterfaceService.creativeCreate(oauthToken.getAccessToken(), accountId, creativeJson, 1);
|
|
Map<String, Object> returnCreativeMap = kuaishouInterfaceService.creativeCreate(oauthToken.getAccessToken(), accountId, creativeJson, 1);
|
|
if (!Check.isNullMap(returnCreativeMap)) {
|
|
if (!Check.isNullMap(returnCreativeMap)) {
|
|
Integer code = (Integer) returnCreativeMap.get("code");
|
|
Integer code = (Integer) returnCreativeMap.get("code");
|