Forráskód Böngészése

定时任务调整 && 创意标签白名单

yumeng 4 éve
szülő
commit
ec83d78aae

+ 0 - 20
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/BatchServiceImpl.java

@@ -1860,39 +1860,29 @@ public class BatchServiceImpl implements IBatchService {
         if (Check.isNull(requestJson)) {
             throw new Exception("入参为空");
         }
-
-
         JSONObject creativeJson = new JSONObject();
         creativeJson.put("advertiser_id", token.getAccountId());
-
         Long creativeId = requestJson.getLong("creativeId");
         if (Check.isNull(creativeId)) {
             throw new Exception("请选择广告创意");
         }
         creativeJson.put("creative_id", creativeId);
-
-
         // 创意名称
         if (!Check.isNull(requestJson.get("creativeName"))) {
             creativeJson.put("creative_name", requestJson.get("creativeName"));
         }
-
         //封面
         if (!Check.isNull(requestJson.get("photoId"))) {
             creativeJson.put("photo_id", requestJson.get("photoId"));
         }
-
         // 视频id
         if (!Check.isNull(requestJson.get("imageToken"))) {
             creativeJson.put("image_token", requestJson.get("imageToken"));
         }
-
         // 行动号召按钮
         if (!Check.isNull(requestJson.get("actionBarText"))) {
             creativeJson.put("action_bar_text", requestJson.get("actionBarText"));
         }
-
-
         // 广告语
         if (!Check.isNull(requestJson.get("description"))) {
             creativeJson.put("description", requestJson.getString("description").trim());
@@ -1901,7 +1891,6 @@ public class BatchServiceImpl implements IBatchService {
         if (!Check.isNull(requestJson.get("stickerTitle"))) {
             creativeJson.put("sticker_title", requestJson.get("stickerTitle"));
         }
-
         // 贴纸样式
         if (!Check.isNull(requestJson.get("overlayType"))) {
             creativeJson.put("overlay_type", requestJson.get("overlayType"));
@@ -1910,18 +1899,15 @@ public class BatchServiceImpl implements IBatchService {
         if (!Check.isNull(requestJson.get("clickTrackUrl"))) {
             creativeJson.put("click_track_url", requestJson.get("clickTrackUrl"));
         }
-
         // 后贴片 第三方检测链接
         if (!Check.isNull(requestJson.get("adPhotoPlayedT3sUrl"))) {
             creativeJson.put("ad_photo_played_t3s_url", requestJson.get("adPhotoPlayedT3sUrl"));
         }
-
         // 后贴片 第三方检测链接
         if (!Check.isNull(requestJson.get("impressionUrl"))) {
             creativeJson.put("impression_url", requestJson.get("impressionUrl"));
         }
         JSONObject returnJson = updateService.updateCreative(token.getAccessToken(), creativeJson);
-
         return returnJson;
     }
 
@@ -1935,14 +1921,12 @@ public class BatchServiceImpl implements IBatchService {
      */
     @Override
     public JSONObject getWhiteList(Long accountId, String accessToken) {
-
         String url = "https://ad.e.kuaishou.com/rest/openapi/v1/advertiser/white_list";
         Map<String, String> headers = new HashMap<String, String>();
         headers.put("Content-Type", "application/json");
         headers.put("Access-Token", accessToken);
         Map<String, Object> param = new HashMap<String, Object>();
         param.put("advertiser_id", accountId);
-
         String result = HttpUtils.httpPostRequest(url, param, headers);
         JSONObject resultJson = JSONObject.parseObject(result);
         log.info("获取联盟白名单,accountId:{},data:{}", accountId, resultJson);
@@ -1951,7 +1935,6 @@ public class BatchServiceImpl implements IBatchService {
             if (code == 0) {
                 return resultJson.getJSONObject("data");
             }
-
         }
         return null;
     }
@@ -1997,7 +1980,6 @@ public class BatchServiceImpl implements IBatchService {
      */
     @Override
     public JSONArray getCreativeCategory(Long accountId, String accessToken) {
-
         try {
             String url = "https://ad.e.kuaishou.com/rest/openapi/v1/creative/creative_category/list";
             Map<String, String> headers = new HashMap<String, String>();
@@ -2038,7 +2020,6 @@ public class BatchServiceImpl implements IBatchService {
 
 
     private JSONArray getSecond(String categoryId, JSONArray details) {
-
         JSONArray secondArr = new JSONArray();
         for (int i = 0; i < details.size(); i++) {
             JSONObject secondJson = details.getJSONObject(i);
@@ -2060,7 +2041,6 @@ public class BatchServiceImpl implements IBatchService {
             if (categoryId.equals(parent_id)) {
                 thirdArr.add(thirdJson);
             }
-
         }
         return thirdArr;
     }