|
@@ -1072,7 +1072,13 @@ public class BatchServiceImpl implements IBatchService {
|
|
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("creative_name", name);
|
|
creativeJson.put("creative_name", name);
|
|
- // creativeJson.put("click_track_url", click_track_url);
|
|
|
|
|
|
+ String imageToken = null;
|
|
|
|
+ if (!Check.isNull(creative.getStickerTitle()) && !Check.isNull(creative.getOverlayType())) {
|
|
|
|
+ imageToken = creative.getOverlayBgImageToken();
|
|
|
|
+ } else {
|
|
|
|
+ imageToken = creative.getImageToken();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
//封面广告语标题
|
|
//封面广告语标题
|
|
if (!Check.isNull(creative.getStickerTitle())) {
|
|
if (!Check.isNull(creative.getStickerTitle())) {
|
|
@@ -1083,6 +1089,7 @@ public class BatchServiceImpl implements IBatchService {
|
|
creativeJson.put("overlay_type", creative.getOverlayType());
|
|
creativeJson.put("overlay_type", creative.getOverlayType());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
// 第三方有效播放监测链接
|
|
// 第三方有效播放监测链接
|
|
if (!Check.isNull(creative.getAdPhotoPlayedT3sUrl())) {
|
|
if (!Check.isNull(creative.getAdPhotoPlayedT3sUrl())) {
|
|
creativeJson.put("ad_photo_played_t3s_url", creative.getAdPhotoPlayedT3sUrl());
|
|
creativeJson.put("ad_photo_played_t3s_url", creative.getAdPhotoPlayedT3sUrl());
|
|
@@ -1117,8 +1124,7 @@ public class BatchServiceImpl implements IBatchService {
|
|
} else {
|
|
} else {
|
|
String photo_id = creative.getPhotoId();
|
|
String photo_id = creative.getPhotoId();
|
|
creativeJson.put("photo_id", photo_id);
|
|
creativeJson.put("photo_id", photo_id);
|
|
- String image = creative.getImageToken();
|
|
|
|
- creativeJson.put("image_token", image);
|
|
|
|
|
|
+ creativeJson.put("image_token", imageToken);
|
|
creativeJson.put("click_track_url", clickTrackUrl);
|
|
creativeJson.put("click_track_url", clickTrackUrl);
|
|
|
|
|
|
}
|
|
}
|
|
@@ -1137,8 +1143,7 @@ public class BatchServiceImpl implements IBatchService {
|
|
} else {
|
|
} else {
|
|
String photo_id = creative.getPhotoId();
|
|
String photo_id = creative.getPhotoId();
|
|
creativeJson.put("photo_id", photo_id);
|
|
creativeJson.put("photo_id", photo_id);
|
|
- String image = creative.getImageToken();
|
|
|
|
- creativeJson.put("image_token", image);
|
|
|
|
|
|
+ creativeJson.put("image_token", imageToken);
|
|
if (!Check.isNull(click_track_url)) {
|
|
if (!Check.isNull(click_track_url)) {
|
|
creativeJson.put("click_track_url", click_track_url);
|
|
creativeJson.put("click_track_url", click_track_url);
|
|
}
|
|
}
|
|
@@ -1159,8 +1164,8 @@ public class BatchServiceImpl implements IBatchService {
|
|
} else {
|
|
} else {
|
|
String photo_id = creative.getPhotoId();
|
|
String photo_id = creative.getPhotoId();
|
|
creativeJson.put("photo_id", photo_id);
|
|
creativeJson.put("photo_id", photo_id);
|
|
- String image = creative.getImageToken();
|
|
|
|
- creativeJson.put("image_token", image);
|
|
|
|
|
|
+ creativeJson.put("image_token", imageToken);
|
|
|
|
+
|
|
if (!Check.isNull(click_track_url)) {
|
|
if (!Check.isNull(click_track_url)) {
|
|
creativeJson.put("click_track_url", click_track_url);
|
|
creativeJson.put("click_track_url", click_track_url);
|
|
}
|
|
}
|
|
@@ -1186,8 +1191,7 @@ public class BatchServiceImpl implements IBatchService {
|
|
} else {
|
|
} else {
|
|
String photo_id = creative.getPhotoId();
|
|
String photo_id = creative.getPhotoId();
|
|
creativeJson.put("photo_id", photo_id);
|
|
creativeJson.put("photo_id", photo_id);
|
|
- String image = creative.getImageToken();
|
|
|
|
- creativeJson.put("image_token", image);
|
|
|
|
|
|
+ creativeJson.put("image_token", imageToken);
|
|
if (!Check.isNull(click_track_url)) {
|
|
if (!Check.isNull(click_track_url)) {
|
|
creativeJson.put("click_track_url", click_track_url);
|
|
creativeJson.put("click_track_url", click_track_url);
|
|
}
|
|
}
|
|
@@ -1285,6 +1289,8 @@ public class BatchServiceImpl implements IBatchService {
|
|
|
|
|
|
String creativeMaterialType = dataJson.getString("creativeMaterialType");
|
|
String creativeMaterialType = dataJson.getString("creativeMaterialType");
|
|
String shortSlogan = dataJson.getString("shortSlogan");
|
|
String shortSlogan = dataJson.getString("shortSlogan");
|
|
|
|
+ String overlayType = dataJson.getString("overlayType");
|
|
|
|
+ String stickerTitle = dataJson.getString("stickerTitle");
|
|
|
|
|
|
|
|
|
|
if (!Check.isNull(dataJsons)) {
|
|
if (!Check.isNull(dataJsons)) {
|
|
@@ -1309,6 +1315,12 @@ public class BatchServiceImpl implements IBatchService {
|
|
creativeJson.put("creative_material_type", creativeMaterialType);
|
|
creativeJson.put("creative_material_type", creativeMaterialType);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (!Check.isNull(overlayType)) {
|
|
|
|
+ creativeJson.put("overlay_type", overlayType);
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(stickerTitle)) {
|
|
|
|
+ creativeJson.put("sticker_title", stickerTitle);
|
|
|
|
+ }
|
|
if (creativeMaterialType.equals("4")) {
|
|
if (creativeMaterialType.equals("4")) {
|
|
if (!Check.isNull("shortSlogan")) {
|
|
if (!Check.isNull("shortSlogan")) {
|
|
creativeJson.put("short_slogan", shortSlogan);
|
|
creativeJson.put("short_slogan", shortSlogan);
|
|
@@ -1795,10 +1807,8 @@ public class BatchServiceImpl implements IBatchService {
|
|
headers.put("Access-Token", accessToken);
|
|
headers.put("Access-Token", accessToken);
|
|
Map<String, Object> param = new HashMap<String, Object>();
|
|
Map<String, Object> param = new HashMap<String, Object>();
|
|
param.put("advertiser_id", accountId);
|
|
param.put("advertiser_id", accountId);
|
|
-
|
|
|
|
String result = HttpUtils.httpPostRequest(url, param, headers);
|
|
String result = HttpUtils.httpPostRequest(url, param, headers);
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
- log.info("获取贴纸样式,accountId:{},data:{}", accountId, resultJson);
|
|
|
|
if (!Check.isNull(resultJson)) {
|
|
if (!Check.isNull(resultJson)) {
|
|
Integer code = resultJson.getInteger("code");
|
|
Integer code = resultJson.getInteger("code");
|
|
if (code == 0) {
|
|
if (code == 0) {
|