yumeng 4 лет назад
Родитель
Сommit
cc7ae44f08

+ 1 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouCreative.java

@@ -190,6 +190,7 @@ public class KuaiShouCreative {
     @Excel(name = "第三方有效播放监测链接", width = 15)
     @ApiModelProperty(value = "第三方有效播放监测链接")
     private String adPhotoPlayedT3sUrl;
+    private String shortSlogan;
     /**
      * 创建时间
      */

+ 2 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouCreativeMapper.xml

@@ -33,6 +33,7 @@
         site_id,
         programmed_creative_material,
         photo_ids,
+        short_slogan,
         creative_create_time,
         creative_update_time,
         create_time,
@@ -70,6 +71,7 @@
             #{creative.siteId},
             #{creative.programmedCreativeMaterial},
             #{creative.photoIds},
+            #{creative.shortSlogan},
             #{creative.creativeCreateTime},
             #{creative.creativeUpdateTime},
             #{creative.createTime},

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

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

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

@@ -215,6 +215,7 @@ public class KuaiShouGroupServiceImpl extends ServiceImpl<KuaiShouGroupMapper, K
                     creative.setCreativeCreateTime(detailJson.getDate("create_time"));
                     creative.setCreativeUpdateTime(detailJson.getDate("update_time"));
                     creative.setFirstFrameType(detailJson.getInteger("first_frame_type"));
+                    creative.setShortSlogan(detailJson.getString("short_slogan"));
                     JSONObject displayInfoJson = detailJson.getJSONObject("display_info");
                     if (!Check.isNull(displayInfoJson)) {
                         creative.setDescription(displayInfoJson.getString("description"));

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

@@ -1347,6 +1347,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                     creative.setCreativeCreateTime(detailJson.getDate("create_time"));
                     creative.setCreativeUpdateTime(detailJson.getDate("update_time"));
                     creative.setFirstFrameType(detailJson.getInteger("first_frame_type"));
+                    creative.setShortSlogan(detailJson.getString("short_slogan"));
                     JSONObject displayInfoJson = detailJson.getJSONObject("display_info");
                     if (!Check.isNull(displayInfoJson)) {
                         creative.setDescription(displayInfoJson.getString("description"));
@@ -1526,6 +1527,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                                     creative.setCreativeCreateTime(detailJson.getDate("create_time"));
                                     creative.setCreativeUpdateTime(detailJson.getDate("update_time"));
                                     creative.setFirstFrameType(detailJson.getInteger("first_frame_type"));
+                                    creative.setShortSlogan(detailJson.getString("short_slogan"));
                                     JSONObject displayInfoJson = detailJson.getJSONObject("display_info");
                                     if (!Check.isNull(displayInfoJson)) {
                                         creative.setDescription(displayInfoJson.getString("description"));
@@ -3050,6 +3052,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                                     creative.setCreativeCreateTime(detailJson.getDate("create_time"));
                                     creative.setCreativeUpdateTime(detailJson.getDate("update_time"));
                                     creative.setFirstFrameType(detailJson.getInteger("first_frame_type"));
+                                    creative.setShortSlogan(detailJson.getString("short_slogan"));
                                     JSONObject displayInfoJson = detailJson.getJSONObject("display_info");
                                     if (!Check.isNull(displayInfoJson)) {
                                         creative.setDescription(displayInfoJson.getString("description"));