|
@@ -5,8 +5,10 @@ import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
import cn.com.ctop.common.module.utils.*;
|
|
import cn.com.ctop.common.module.utils.*;
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouImageGet;
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouImageGet;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.*;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.*;
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -67,6 +69,8 @@ public class CrossAccountBatchServiceImpl implements ICrossAccountBatchService {
|
|
for (int j = 0; j < unitNames.size(); j++) {
|
|
for (int j = 0; j < unitNames.size(); j++) {
|
|
String unitName = unitNames.getString(j);
|
|
String unitName = unitNames.getString(j);
|
|
if (!Check.isNull(unitName)) {
|
|
if (!Check.isNull(unitName)) {
|
|
|
|
+ String s = JSON.toJSONString(createUnitJson, SerializerFeature.DisableCircularReferenceDetect);
|
|
|
|
+ createUnitJson = JSON.parseObject(s);
|
|
createUnitJson.remove("campaign_id");
|
|
createUnitJson.remove("campaign_id");
|
|
createUnitJson.remove("unit_name");
|
|
createUnitJson.remove("unit_name");
|
|
createUnitJson.put("campaign_id", campaignId);
|
|
createUnitJson.put("campaign_id", campaignId);
|
|
@@ -107,6 +111,9 @@ public class CrossAccountBatchServiceImpl implements ICrossAccountBatchService {
|
|
|
|
|
|
JSONObject createUnitJson = this.getCreateUnitJson(unitIdenticalJson);// 通用参数组装
|
|
JSONObject createUnitJson = this.getCreateUnitJson(unitIdenticalJson);// 通用参数组装
|
|
for (int j = 0; j < unitNames.size(); j++) {
|
|
for (int j = 0; j < unitNames.size(); j++) {
|
|
|
|
+ String s = JSON.toJSONString(createUnitJson, SerializerFeature.DisableCircularReferenceDetect);
|
|
|
|
+ createUnitJson = JSON.parseObject(s);
|
|
|
|
+
|
|
String unitName = unitNames.getString(j);
|
|
String unitName = unitNames.getString(j);
|
|
createUnitJson.put("advertiser_id", oauthToken.getAccountId());
|
|
createUnitJson.put("advertiser_id", oauthToken.getAccountId());
|
|
createUnitJson.put("access_token", oauthToken.getAccessToken());
|
|
createUnitJson.put("access_token", oauthToken.getAccessToken());
|
|
@@ -192,6 +199,15 @@ public class CrossAccountBatchServiceImpl implements ICrossAccountBatchService {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ String clickTrackUrl = accountJson.getString("clickTrackUrl");
|
|
|
|
+ String impressionUrl = accountJson.getString("impressionUrl");
|
|
|
|
+ String adPhotoPlayedT3sUrl = accountJson.getString("adPhotoPlayedT3sUrl");
|
|
|
|
+ Integer creativeCategory = accountJson.getInteger("creativeCategory");
|
|
|
|
+ JSONArray creativeTag = accountJson.getJSONArray("creativeTag");
|
|
|
|
+ String actionBarText = accountJson.getString("actionBarText");
|
|
|
|
+ String siteId = accountJson.getString("siteId");
|
|
|
|
+
|
|
|
|
+
|
|
for (int i = 0; i < photoArr.size(); i++) {
|
|
for (int i = 0; i < photoArr.size(); i++) {
|
|
JSONObject photoJson = photoArr.getJSONObject(i);
|
|
JSONObject photoJson = photoArr.getJSONObject(i);
|
|
if (Check.isNull(photoJson)) {
|
|
if (Check.isNull(photoJson)) {
|
|
@@ -201,89 +217,122 @@ public class CrossAccountBatchServiceImpl implements ICrossAccountBatchService {
|
|
creativeJson.put("advertiser_id", oauthToken.getAccountId());
|
|
creativeJson.put("advertiser_id", oauthToken.getAccountId());
|
|
creativeJson.put("access_token", oauthToken.getAccessToken());
|
|
creativeJson.put("access_token", oauthToken.getAccessToken());
|
|
creativeJson.put("unit_id", unitId);
|
|
creativeJson.put("unit_id", unitId);
|
|
- if (!Check.isNull(photoJson.getString("clickTrackUrl"))) {
|
|
|
|
- creativeJson.put("click_track_url", photoJson.getString("clickTrackUrl")); //第三方点击检测链接
|
|
|
|
|
|
+ creativeJson.put("unit_name", accountJson.getString("unitName"));
|
|
|
|
+ if (!Check.isNull(clickTrackUrl)) {
|
|
|
|
+ creativeJson.put("click_track_url", clickTrackUrl); //第三方点击检测链接
|
|
}
|
|
}
|
|
- if (!Check.isNull(photoJson.getString("impressionUrl"))) {
|
|
|
|
- creativeJson.put("impression_url", photoJson.getString("impressionUrl")); //第三方开始播放监测链接
|
|
|
|
|
|
+ if (!Check.isNull(impressionUrl)) {
|
|
|
|
+ creativeJson.put("impression_url", impressionUrl); //第三方开始播放监测链接
|
|
}
|
|
}
|
|
- if (!Check.isNull(photoJson.getString("adPhotoPlayedT3sUrl"))) {
|
|
|
|
- creativeJson.put("ad_photo_played_t3s_url", photoJson.getString("adPhotoPlayedT3sUrl")); //第三方有效播放监测链接
|
|
|
|
|
|
+ if (!Check.isNull(adPhotoPlayedT3sUrl)) {
|
|
|
|
+ creativeJson.put("ad_photo_played_t3s_url", adPhotoPlayedT3sUrl); //第三方有效播放监测链接
|
|
}
|
|
}
|
|
if (!Check.isNull(photoJson.getString("actionbarClickUrl"))) {
|
|
if (!Check.isNull(photoJson.getString("actionbarClickUrl"))) {
|
|
creativeJson.put("actionbar_click_url", photoJson.getString("actionbarClickUrl")); //第三方点击按钮监测链接
|
|
creativeJson.put("actionbar_click_url", photoJson.getString("actionbarClickUrl")); //第三方点击按钮监测链接
|
|
}
|
|
}
|
|
- if (!Check.isNull(photoJson.getInteger("creativeCategory"))) {
|
|
|
|
- creativeJson.put("creative_category", photoJson.getInteger("creativeCategory")); // 创意分类
|
|
|
|
|
|
+ if (!Check.isNull(creativeCategory)) {
|
|
|
|
+ creativeJson.put("creative_category", creativeCategory); // 创意分类
|
|
}
|
|
}
|
|
- if (!Check.isNull(photoJson.getJSONArray("creativeTag"))) {
|
|
|
|
- creativeJson.put("creative_tag", photoJson.getJSONArray("creativeTag")); //创意标签
|
|
|
|
|
|
+ if (!Check.isNull((creativeTag))) {
|
|
|
|
+ creativeJson.put("creative_tag", creativeTag); //创意标签
|
|
}
|
|
}
|
|
|
|
|
|
Long creativeMaterialType = photoJson.getLong("creativeMaterialType");
|
|
Long creativeMaterialType = photoJson.getLong("creativeMaterialType");
|
|
|
|
|
|
JSONArray creatives = new JSONArray();
|
|
JSONArray creatives = new JSONArray();
|
|
- JSONObject createJson = new JSONObject();
|
|
|
|
- if (!Check.isNull(photoJson.getString("creativeName"))) {
|
|
|
|
- createJson.put("creative_name", photoJson.getString("creativeName")); // 创意名称
|
|
|
|
- }
|
|
|
|
- if (!Check.isNull(creativeMaterialType)) {
|
|
|
|
- createJson.put("creative_material_type", creativeMaterialType); // 素材类型
|
|
|
|
- }
|
|
|
|
- if (!Check.isNull(photoJson.getString("actionBar_text"))) {
|
|
|
|
- createJson.put("action_bar_text", photoJson.getString("actionBarText")); // 行动号召按钮文案
|
|
|
|
- }
|
|
|
|
- if (!Check.isNull(photoJson.getString("description"))) {
|
|
|
|
- createJson.put("description", photoJson.getString("description")); // 广告语
|
|
|
|
- }
|
|
|
|
- if (!Check.isNull(photoJson.getString("stickerTitle"))) {
|
|
|
|
- createJson.put("sticker_title", photoJson.getString("stickerTitle")); //封面广告语标题
|
|
|
|
- }
|
|
|
|
- if (!Check.isNull(photoJson.getString("overlayType"))) {
|
|
|
|
- createJson.put("overlay_type", photoJson.getString("overlayType")); // 贴纸样式类型
|
|
|
|
- }
|
|
|
|
- if (!Check.isNull(photoJson.getString("exposeTag"))) {
|
|
|
|
- createJson.put("expose_tag", photoJson.getString("exposeTag")); //广告标签
|
|
|
|
- }
|
|
|
|
- if (!Check.isNull(photoJson.getString("newExposeTag"))) {
|
|
|
|
- createJson.put("new_expose_tag", photoJson.getString("newExposeTag")); // 广告标签2期
|
|
|
|
- }
|
|
|
|
- if (!Check.isNull(photoJson.getString("siteId"))) {
|
|
|
|
- createJson.put("site_id", photoJson.getString("siteId")); //安卓下载中间页ID
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
String creativeName = photoJson.getString("creativeName");// 创意名称
|
|
String creativeName = photoJson.getString("creativeName");// 创意名称
|
|
if (4 == creativeMaterialType) { // 便利贴组装数据
|
|
if (4 == creativeMaterialType) { // 便利贴组装数据
|
|
- if (!Check.isNull(photoJson.getString("shortSlogan"))) {
|
|
|
|
- createJson.put("short_slogan", photoJson.getString("shortSlogan")); // 便利贴创意短广告语
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
JSONArray imageTokens = photoJson.getJSONArray("imageTokens");
|
|
JSONArray imageTokens = photoJson.getJSONArray("imageTokens");
|
|
for (int j = 0; j < imageTokens.size(); j++) {
|
|
for (int j = 0; j < imageTokens.size(); j++) {
|
|
String imageToken = imageTokens.getString(j);
|
|
String imageToken = imageTokens.getString(j);
|
|
if (!Check.isNull(imageToken)) {
|
|
if (!Check.isNull(imageToken)) {
|
|
- createJson.put("image_tokens", imageToken); // 便利贴创意短广告语
|
|
|
|
|
|
+ JSONObject createJson = new JSONObject();
|
|
|
|
+ if (!Check.isNull(photoJson.getString("shortSlogan"))) {
|
|
|
|
+ createJson.put("short_slogan", photoJson.getString("shortSlogan")); // 便利贴创意短广告语
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(creativeMaterialType)) {
|
|
|
|
+ createJson.put("creative_material_type", creativeMaterialType); // 素材类型
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(actionBarText)) {
|
|
|
|
+ createJson.put("action_bar_text", actionBarText); // 行动号召按钮文案
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("description"))) {
|
|
|
|
+ createJson.put("description", photoJson.getString("description")); // 广告语
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("stickerTitle"))) {
|
|
|
|
+ createJson.put("sticker_title", photoJson.getString("stickerTitle")); //封面广告语标题
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("overlayType"))) {
|
|
|
|
+ createJson.put("overlay_type", photoJson.getString("overlayType")); // 贴纸样式类型
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("exposeTag"))) {
|
|
|
|
+ createJson.put("expose_tag", photoJson.getString("exposeTag")); //广告标签
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("newExposeTag"))) {
|
|
|
|
+ createJson.put("new_expose_tag", photoJson.getString("newExposeTag")); // 广告标签2期
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(siteId)) {
|
|
|
|
+ createJson.put("site_id", siteId); //安卓下载中间页ID
|
|
|
|
+ }
|
|
|
|
+ JSONArray imageTokenArr = new JSONArray();
|
|
|
|
+ imageTokenArr.add(imageToken);
|
|
|
|
+ createJson.put("image_tokens", imageTokenArr); // 便利贴创意短广告语
|
|
if (!Check.isNull(creativeName)) {
|
|
if (!Check.isNull(creativeName)) {
|
|
createJson.put("creative_name", creativeName + "_" + RandomUtil.verifyCodeV2()); // 便利贴创意短广告语
|
|
createJson.put("creative_name", creativeName + "_" + RandomUtil.verifyCodeV2()); // 便利贴创意短广告语
|
|
}
|
|
}
|
|
creatives.add(createJson);
|
|
creatives.add(createJson);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ creativeJson.put("creatives", creatives);
|
|
} else { // 非便利贴组装数据
|
|
} else { // 非便利贴组装数据
|
|
- if (!Check.isNull(photoJson.getLong("photoId"))) {
|
|
|
|
- createJson.put("photo_id", photoJson.getLong("photoId")); // 视频id
|
|
|
|
- }
|
|
|
|
- JSONArray imageTokenArr = photoJson.getJSONArray("imageToken");
|
|
|
|
|
|
+ JSONArray imageTokenArr = photoJson.getJSONArray("imageTokenArr");
|
|
if (Check.isNull(imageTokenArr)) { // 如果图片为空 说明是首帧创建
|
|
if (Check.isNull(imageTokenArr)) { // 如果图片为空 说明是首帧创建
|
|
|
|
+ JSONObject createJson = new JSONObject();
|
|
|
|
+ if (!Check.isNull(photoJson.getLong("photoId"))) {
|
|
|
|
+ createJson.put("photo_id", photoJson.getLong("photoId")); // 视频id
|
|
|
|
+ }
|
|
createJson.put("creative_name", creativeName); // 创意名称
|
|
createJson.put("creative_name", creativeName); // 创意名称
|
|
|
|
+ if (!Check.isNull(creativeMaterialType)) {
|
|
|
|
+ createJson.put("creative_material_type", creativeMaterialType); // 素材类型
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(actionBarText)) {
|
|
|
|
+ createJson.put("action_bar_text", actionBarText); // 行动号召按钮文案
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("description"))) {
|
|
|
|
+ createJson.put("description", photoJson.getString("description")); // 广告语
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("stickerTitle"))) {
|
|
|
|
+ createJson.put("sticker_title", photoJson.getString("stickerTitle")); //封面广告语标题
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("overlayType"))) {
|
|
|
|
+ createJson.put("overlay_type", photoJson.getString("overlayType")); // 贴纸样式类型
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("exposeTag"))) {
|
|
|
|
+ createJson.put("expose_tag", photoJson.getString("exposeTag")); //广告标签
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("newExposeTag"))) {
|
|
|
|
+ createJson.put("new_expose_tag", photoJson.getString("newExposeTag")); // 广告标签2期
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(siteId)) {
|
|
|
|
+ createJson.put("site_id", siteId); //安卓下载中间页ID
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!Check.isNull(photoJson.getString("stickerTitle"))) {
|
|
|
|
+ createJson.put("sticker_title", photoJson.getString("stickerTitle")); //封面广告语标题
|
|
|
|
+ }
|
|
|
|
+
|
|
creatives.add(createJson);
|
|
creatives.add(createJson);
|
|
} else { // 选择多张图片进行创建
|
|
} else { // 选择多张图片进行创建
|
|
for (int j = 0; j < imageTokenArr.size(); j++) {
|
|
for (int j = 0; j < imageTokenArr.size(); j++) {
|
|
String signature = imageTokenArr.getString(j);
|
|
String signature = imageTokenArr.getString(j);
|
|
-
|
|
|
|
if (Check.isNull(signature)) {
|
|
if (Check.isNull(signature)) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
+ JSONObject createJson = new JSONObject();
|
|
|
|
+ if (!Check.isNull(photoJson.getLong("photoId"))) {
|
|
|
|
+ createJson.put("photo_id", photoJson.getLong("photoId")); // 视频id
|
|
|
|
+ }
|
|
QueryWrapper<KuaiShouImageGet> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<KuaiShouImageGet> queryWrapper = new QueryWrapper<>();
|
|
queryWrapper.eq("account_id", accountId);
|
|
queryWrapper.eq("account_id", accountId);
|
|
queryWrapper.eq("signature", signature);
|
|
queryWrapper.eq("signature", signature);
|
|
@@ -301,6 +350,31 @@ public class CrossAccountBatchServiceImpl implements ICrossAccountBatchService {
|
|
}
|
|
}
|
|
String name = creativeName + "_" + RandomUtil.verifyCodeV2();
|
|
String name = creativeName + "_" + RandomUtil.verifyCodeV2();
|
|
createJson.put("creative_name", name); // 创意名称
|
|
createJson.put("creative_name", name); // 创意名称
|
|
|
|
+ if (!Check.isNull(creativeMaterialType)) {
|
|
|
|
+ createJson.put("creative_material_type", creativeMaterialType); // 素材类型
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(actionBarText)) {
|
|
|
|
+ createJson.put("action_bar_text", actionBarText); // 行动号召按钮文案
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("description"))) {
|
|
|
|
+ createJson.put("description", photoJson.getString("description")); // 广告语
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!Check.isNull(photoJson.getString("stickerTitle"))) {
|
|
|
|
+ createJson.put("sticker_title", photoJson.getString("stickerTitle")); //封面广告语标题
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("overlayType"))) {
|
|
|
|
+ createJson.put("overlay_type", photoJson.getString("overlayType")); // 贴纸样式类型
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("exposeTag"))) {
|
|
|
|
+ createJson.put("expose_tag", photoJson.getString("exposeTag")); //广告标签
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(photoJson.getString("newExposeTag"))) {
|
|
|
|
+ createJson.put("new_expose_tag", photoJson.getString("newExposeTag")); // 广告标签2期
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(siteId)) {
|
|
|
|
+ createJson.put("site_id", siteId); //安卓下载中间页ID
|
|
|
|
+ }
|
|
creatives.add(createJson);
|
|
creatives.add(createJson);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -308,8 +382,8 @@ public class CrossAccountBatchServiceImpl implements ICrossAccountBatchService {
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
- createJson.put("creatives", creatives);
|
|
|
|
- creativeArray.add(createJson);
|
|
|
|
|
|
+ creativeJson.put("creatives", creatives);
|
|
|
|
+ creativeArray.add(creativeJson);
|
|
}
|
|
}
|
|
|
|
|
|
return creativeArray;
|
|
return creativeArray;
|
|
@@ -375,11 +449,13 @@ public class CrossAccountBatchServiceImpl implements ICrossAccountBatchService {
|
|
thread.start();
|
|
thread.start();
|
|
returnJson.put("code", 0);
|
|
returnJson.put("code", 0);
|
|
returnJson.put("accountId", requestJson.getLong("advertiser_id"));
|
|
returnJson.put("accountId", requestJson.getLong("advertiser_id"));
|
|
|
|
+ returnJson.put("campaignId", requestJson.getLong("campaign_id"));
|
|
returnJson.put("unitId", unitId);
|
|
returnJson.put("unitId", unitId);
|
|
returnJson.put("accountName", requestJson.getString("account_name"));
|
|
returnJson.put("accountName", requestJson.getString("account_name"));
|
|
returnJson.put("unitName", requestJson.getString("unit_name"));
|
|
returnJson.put("unitName", requestJson.getString("unit_name"));
|
|
returnJson.put("sceneId", requestJson.getJSONArray("scene_id").toJSONString());
|
|
returnJson.put("sceneId", requestJson.getJSONArray("scene_id").toJSONString());
|
|
returnJson.put("ocpxActionType", requestJson.getLong("ocpx_action_type"));
|
|
returnJson.put("ocpxActionType", requestJson.getLong("ocpx_action_type"));
|
|
|
|
+ returnJson.put("bidType", requestJson.getLong("bid_type"));
|
|
returnJson.put("unitType", requestJson.getInteger("unit_type"));
|
|
returnJson.put("unitType", requestJson.getInteger("unit_type"));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -465,7 +541,9 @@ public class CrossAccountBatchServiceImpl implements ICrossAccountBatchService {
|
|
};
|
|
};
|
|
thread.start();
|
|
thread.start();
|
|
retuenJson.put("code", 0);
|
|
retuenJson.put("code", 0);
|
|
- retuenJson.put("unit_id", requestJson.getString("unit_id"));
|
|
|
|
|
|
+ retuenJson.put("accountId", requestJson.getLong("advertiser_id"));
|
|
|
|
+ retuenJson.put("unitId", requestJson.getString("unit_id"));
|
|
|
|
+ retuenJson.put("unitName", requestJson.getString("unit_name"));
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if (code == 500000 && count <= 4) {
|
|
if (code == 500000 && count <= 4) {
|
|
@@ -477,7 +555,9 @@ public class CrossAccountBatchServiceImpl implements ICrossAccountBatchService {
|
|
log.error("创建广告创意失败,advertiser_id:{},返回信息:{},入参:{}", advertiserId, resultJson, requestJson, count + 1);
|
|
log.error("创建广告创意失败,advertiser_id:{},返回信息:{},入参:{}", advertiserId, resultJson, requestJson, count + 1);
|
|
retuenJson.put("code", -1);
|
|
retuenJson.put("code", -1);
|
|
retuenJson.put("message", resultJson.getString("message"));
|
|
retuenJson.put("message", resultJson.getString("message"));
|
|
- retuenJson.put("unit_id", requestJson.getString("unit_id"));
|
|
|
|
|
|
+ retuenJson.put("accountId", requestJson.getLong("advertiser_id"));
|
|
|
|
+ retuenJson.put("unitId", requestJson.getString("unit_id"));
|
|
|
|
+ retuenJson.put("unitName", requestJson.getString("unit_name"));
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if (count <= 4) {
|
|
if (count <= 4) {
|
|
@@ -486,14 +566,18 @@ public class CrossAccountBatchServiceImpl implements ICrossAccountBatchService {
|
|
log.error("快手创建广告创意返回内容为空,advertiser_id:{},入参:{}", advertiserId, requestJson);
|
|
log.error("快手创建广告创意返回内容为空,advertiser_id:{},入参:{}", advertiserId, requestJson);
|
|
retuenJson.put("code", -1);
|
|
retuenJson.put("code", -1);
|
|
retuenJson.put("message", "创建创意失败,返回信息为空");
|
|
retuenJson.put("message", "创建创意失败,返回信息为空");
|
|
- retuenJson.put("unit_id", requestJson.getString("unit_id"));
|
|
|
|
|
|
+ retuenJson.put("accountId", requestJson.getLong("advertiser_id"));
|
|
|
|
+ retuenJson.put("unitId", requestJson.getString("unit_id"));
|
|
|
|
+ retuenJson.put("unitName", requestJson.getString("unit_name"));
|
|
}
|
|
}
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error("创建广告创意失败,advertiser_id:{}", requestJson.getLong("advertiser_id"));
|
|
log.error("创建广告创意失败,advertiser_id:{}", requestJson.getLong("advertiser_id"));
|
|
retuenJson.put("code", -1);
|
|
retuenJson.put("code", -1);
|
|
retuenJson.put("message", e.getMessage());
|
|
retuenJson.put("message", e.getMessage());
|
|
- retuenJson.put("unit_id", requestJson.getString("unit_id"));
|
|
|
|
|
|
+ retuenJson.put("accountId", requestJson.getLong("advertiser_id"));
|
|
|
|
+ retuenJson.put("unitId", requestJson.getString("unit_id"));
|
|
|
|
+ retuenJson.put("unitName", requestJson.getString("unit_name"));
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
return retuenJson;
|
|
return retuenJson;
|