Ver Fonte

调整程序化创意

yumeng há 4 anos atrás
pai
commit
f703efa011

+ 8 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouProgramCreativeServiceImpl.java

@@ -139,6 +139,13 @@ public class KuaishouProgramCreativeServiceImpl extends ServiceImpl<KuaishouProg
                 pramsJson.put("cover_slogans", requestJson.getJSONArray("coverSlogans"));
             }
 
+            Integer creativeCategory = requestJson.getInteger("creativeCategory");
+            JSONArray creativeTag = requestJson.getJSONArray("creativeTag");
+
+            if (!Check.isNull(creativeCategory) && !Check.isNull(creativeTag)) {
+                pramsJson.put("creative_category", creativeCategory);
+                pramsJson.put("creative_tag", creativeTag);
+            }
             pramsJson.put("action_bar", requestJson.getString("actionBarText"));
             pramsJson.put("captions", requestJson.getJSONArray("captions"));
             if (!Check.isNull(requestJson.getString("clickUrl"))) {
@@ -151,8 +158,6 @@ public class KuaishouProgramCreativeServiceImpl extends ServiceImpl<KuaishouProg
             headers.put("Content-Type", "application/json");
             headers.put("Access-Token", oauthToken.getAccessToken());
             String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.PROGRAM_CREATE;
-
-
             JSONArray coverImageTokens = requestJson.getJSONArray("coverImageTokens");
             JSONArray cover_image_tokens = new JSONArray();
             requestJson.remove(coverImageTokens);
@@ -197,7 +202,7 @@ public class KuaishouProgramCreativeServiceImpl extends ServiceImpl<KuaishouProg
                     returnJson.put("isTrueOrFalse", true);
                     returnJson.put("message", "创建成功");
                 } else {
-                    log.error("创建失败:入参:{}",pramsJson);
+                    log.error("创建失败:入参:{}", pramsJson);
                     returnJson.put("isTrueOrFalse", false);
                     returnJson.put("message", jsonObject.getString("message"));
                 }