Browse Source

定向添加扩量

zhaoxian 2 năm trước cách đây
mục cha
commit
6939ecb266

+ 1 - 2
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/MessageTemplateImpl.java

@@ -102,12 +102,11 @@ public class MessageTemplateImpl implements IMessageTemplate {
     public String getCreativeOverRunMessage(Long accountId, Integer creativeCount, String authName) {
         StringBuilder text = new StringBuilder();
         text.append("创意超限通知:").append("<br/>")
-
                 .append("您的快手账户:").append(accountId + ",").append("<br/>")
                 .append("授权名称为:" + authName).append("<br/>")
                 .append("创意api创建超限。").append("<br/>")
                 .append("当前创建数为:").append(creativeCount).append("<br/>")
-                .append("如有疑问,请联系产品:吴永前。");
+                .append("如有疑问,请联系管理员。");
         return text.toString();
     }
 

+ 17 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouVideoGetController.java

@@ -28,7 +28,15 @@ import org.jeecgframework.poi.excel.entity.ExportParams;
 import org.jeecgframework.poi.excel.entity.ImportParams;
 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
@@ -39,7 +47,12 @@ import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
 import java.text.ParseException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 快手-获取视频接口
@@ -111,11 +124,10 @@ public class KuaiShouVideoGetController {
                                                              String signatures,
                                                              String orderBy,
                                                              String photoName,
+                                                             Integer isKaiPing,
                                                              @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                                              @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                              HttpServletRequest req) {
-
-
         Result<PageInfo<KuaiShouVideoGetVo>> result = new Result<>();
         try {
             if (Check.isNull(accountId)) {
@@ -147,6 +159,7 @@ public class KuaiShouVideoGetController {
                     requestMap.put("endDate", endDate);
                 }
                 requestMap.put("photoName", photoName);
+                requestMap.put("isKaiPing", isKaiPing);
                 list = kuaiShouVideoGetService.getVideoList(requestMap);
             } else if ("cost".equals(orderBy)) {
                 if (!Check.isNull(startDate) && !Check.isNull(endDate)) {

+ 6 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouBatchGroupTemplate.java

@@ -175,6 +175,12 @@ public class KuaiShouBatchGroupTemplate {
     @ApiModelProperty(value = "媒体定向排除包")
     private String excludeMedia;
     /**
+     * 是否投放开屏广告位  1投放,0不投放
+     */
+    @Excel(name = "是否投放开屏广告位 1投放,0不投放", width = 15)
+    @ApiModelProperty(value = "是否投放开屏广告位  1投放,0不投放")
+    private Integer splashAdSwitch;
+    /**
      * 创建时间
      */
     @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")

+ 9 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaishouBatchCreativePreview.java

@@ -206,6 +206,14 @@ public class KuaishouBatchCreativePreview {
      */
     private String materialType;
     /**
+     * 开屏视频 id	creative_material_type 为 11 时必填,使用上传视频接口时返回的 photo_id;即素材类型是开屏视频时,必须传入全尺寸的 4 条视频
+     */
+    private String splashPhotoIds;
+    /**
+     * 开屏图片 token	creative_material_type 为 12 时必填,使用上传图片接口时返回的 image_token,素材类型是开屏图片时,必须传入全尺寸的 6 张图片
+     */
+    private String splashImageTokens;
+    /**
      * 创建成功后的计划ID
      */
     private Long campaignId;
@@ -216,7 +224,7 @@ public class KuaishouBatchCreativePreview {
     /**
      * 创建成功后的创意ID
      */
-    private Long creativeId;
+    private String creativeId;
     @TableField(exist = false)
     private String statDate;
 }

+ 6 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaishouBatchGroupPreview.java

@@ -215,6 +215,12 @@ public class KuaishouBatchGroupPreview {
     @ApiModelProperty(value = "媒体定向包")
     private Integer mediaSourceType;
     /**
+     * 是否投放开屏广告位  1投放,0不投放
+     */
+    @Excel(name = "是否投放开屏广告位 1投放,0不投放", width = 15)
+    @ApiModelProperty(value = "是否投放开屏广告位  1投放,0不投放")
+    private Integer splashAdSwitch;
+    /**
      * 媒体定向包
      */
     @Excel(name = "媒体定向包", width = 15)

+ 31 - 37
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouVideoGetMapper.xml

@@ -49,7 +49,10 @@
         cover_url as 'coverUrl',
         signature as 'signature',
         material_type as 'materialType',
-        photo_name as 'photoName'
+        photo_name as 'photoName',
+        width,
+        height,
+        is_kai_ping as 'isKaiPing'
         from ctop_kuaishou_video_get
         where account_id = #{accountId}
         and channel_type = #{channelType}
@@ -58,6 +61,9 @@
         <if test="photoName != null and photoName != '' ">
             and photo_name like CONCAT('%',#{photoName},'%')
         </if>
+        <if test="isKaiPing != null and isKaiPing != '' ">
+            and is_kai_ping = #{isKaiPing}
+        </if>
         <if test="startDate != null and startDate != '' ">
             and stat_date &gt;= #{startDate}
         </if>
@@ -100,7 +106,7 @@
 
     <select id="selectPhotoIdsByAccountId" parameterType="java.lang.Long"
             resultType="cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet">
-        select photo_id,stat_date,channel_type
+        select photo_id, stat_date, channel_type
         from ctop_kuaishou_video_get
         where account_id = #{accountId}
           and status = 0
@@ -323,13 +329,13 @@
     </select>
 
     <select id="getAccountIds" resultType="com.alibaba.fastjson.JSONObject">
-        SELECT t1.account_id 'accountId',DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 15 MINUTE), '%Y-%m-%d %H:%i:%s') 'startDate'
+        SELECT t1.account_id 'accountId',DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 15 MINUTE), '%Y-%m-%d %H:%i:%s') 'startDate'
         FROM ctop_kuaishou_video_get t1
                  LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
         where channel_type = 1
           AND t2.account_status = 0
           AND t1.status = 0
-          AND t1.stat_date >=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 2 DAY), '%Y-%m-%d')
+          AND t1.stat_date >= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 2 DAY), '%Y-%m-%d')
         GROUP BY t1.account_id
     </select>
 
@@ -349,42 +355,30 @@
         GROUP BY photo_id
     </select>
     <select id="getVideoByPhotoIdAndAccountId" resultType="com.alibaba.fastjson.JSONObject">
-        select  cover_url as 'coverUrl',
-                url as 'photoUrl'
-          from ctop_kuaishou_video_get
-        where  account_id = #{accountId}
-        and photo_id = #{photoId}
-        limit 1
+        select cover_url as 'coverUrl', url as 'photoUrl'
+        from ctop_kuaishou_video_get
+        where account_id = #{accountId}
+          and photo_id = #{photoId} limit 1
 
     </select>
 
     <select id="getVideoListByDate" resultType="com.alibaba.fastjson.JSONObject">
-     SELECT
-     account_id as 'accountId',
-     signature as 'signature',
-     photo_name as 'photoName',
-     url as 'url',
-     cover_url as 'coverUrl',
-     channel_type as 'channelType'
-    from ctop_kuaishou_video_get WHERE stat_date BETWEEN #{startDate} AND #{endDate}
-     group by signature
+        SELECT account_id as 'accountId', signature as 'signature', photo_name as 'photoName', url as 'url', cover_url as 'coverUrl', channel_type as 'channelType'
+        from ctop_kuaishou_video_get
+        WHERE stat_date BETWEEN #{startDate} AND #{endDate}
+        group by signature
 
     </select>
     <select id="getDateList" resultType="java.lang.String">
-       SELECT
-	    *
-        FROM
-	(
-		SELECT DISTINCT
-			(
-				DATE_FORMAT(stat_date, '%Y-%m-%d')
-			) AS 'date'
-		FROM
-			ctop_kuaishou_video_get
-			where stat_date is  not null
-	) t1
-        ORDER BY
-	t1.date asc
+        SELECT *
+        FROM (
+                 SELECT DISTINCT (
+                                     DATE_FORMAT(stat_date, '%Y-%m-%d')
+                                     ) AS 'date'
+                 FROM ctop_kuaishou_video_get
+                 where stat_date is not null
+             ) t1
+        ORDER BY t1.date asc
 
     </select>
 
@@ -413,12 +407,12 @@
 
     <select id="getVideoListByPhotoIds" resultType="cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet">
         SELECT
-            photo_id,
-            cover_url,
-            material_type
+        photo_id,
+        cover_url,
+        material_type
         FROM ctop_kuaishou_video_get
         WHERE account_id = #{accountId}
-          AND photo_id IN
+        AND photo_id IN
         <foreach item="phtotId" index="index" collection="photoIds" open="(" separator="," close=")">
             #{phtotId}
         </foreach>

+ 17 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouGroupTemplateServiceImpl.java

@@ -599,6 +599,23 @@ public class KuaiShouGroupTemplateServiceImpl extends ServiceImpl<KuaiShouGroupT
         if (!Check.isNull(paidAudience) && !paidAudience.isEmpty()) {
             target.put("paid_audience", paidAudience);
         }
+        //智能扩量
+        JSONObject intelliExtendJson = new JSONObject();
+        if (!Check.isNull(templateTarget.getIsOpen())) {
+            intelliExtendJson.put("is_open", templateTarget.getIsOpen());
+        }
+        if (!Check.isNull(templateTarget.getNoAgeBreak())) {
+            intelliExtendJson.put("no_age_break", templateTarget.getNoAgeBreak());
+        }
+        if (!Check.isNull(templateTarget.getNoGenderBreak())) {
+            intelliExtendJson.put("no_gender_break", templateTarget.getNoGenderBreak());
+        }
+        if (!Check.isNull(templateTarget.getNoAreaBreak())) {
+            intelliExtendJson.put("no_area_break", templateTarget.getNoAreaBreak());
+        }
+        if (!Check.isNull(intelliExtendJson)) {
+            target.put("intelli_extend", intelliExtendJson);
+        }
         //-------------兴趣行为定向
     /*    JSONObject behaviorInterest = new JSONObject();
         JSONObject behavior = new JSONObject();

+ 5 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouBatchCampaignPreviewServiceImpl.java

@@ -403,6 +403,8 @@ public class KuaishouBatchCampaignPreviewServiceImpl extends ServiceImpl<Kuaisho
                             creativePreview.setCreativeName(photo.getString("creativeName") + k);
                             creativePreview.setImageTokens(photo.getString("imageToken"));
                             creativePreview.setMaterialType(photo.getString("materialType"));
+                            creativePreview.setSplashPhotoIds(photo.getString("splashPhotoIds"));
+                            creativePreview.setSplashImageTokens(photo.getString("splashImageTokens"));
                             if (matchingMethod == 1) {
                                 creativePreview.setDescription(photo.getString("description"));
                             } else if (matchingMethod == 2) {
@@ -424,7 +426,6 @@ public class KuaishouBatchCampaignPreviewServiceImpl extends ServiceImpl<Kuaisho
                                 } else {
                                     creativePreview.setDescription(JSONArray.toJSONString(descriptions));
                                 }
-
                                 //photoId集合
                                 List<String> photos = new ArrayList<>();
                                 // 图片集合
@@ -546,15 +547,14 @@ public class KuaishouBatchCampaignPreviewServiceImpl extends ServiceImpl<Kuaisho
                             creativePreview.setClickTrackUrl(clickTrackUrl);
                             creativePreview.setActionbarClickUrl(actionbarClickUrl);
                             JSONObject photo = photoArr.getJSONObject(k);
-                            JSONObject image = photo.getJSONObject("image");
                             creativePreview.setPlanId(campaignPreview.getId());
                             creativePreview.setGroupId(groupPreview.getId());
                             creativePreview.setPhotoId(photo.getString("photoId"));
                             creativePreview.setImageTokens(photo.getString("imageToken"));
                             creativePreview.setMaterialType(photo.getString("materialType"));
                             creativePreview.setCreativeName(photo.getString("creativeName") + k);
-                            creativePreview.setImageUrl(image.getString("url"));
-                            creativePreview.setImageSignature(image.getString("signature"));
+                            creativePreview.setSplashPhotoIds(photo.getString("splashPhotoIds"));
+                            creativePreview.setSplashImageTokens(photo.getString("splashImageTokens"));
                             if (matchingMethod == 1) {
                                 creativePreview.setDescription(photo.getString("description"));
                             } else if (matchingMethod == 2) {
@@ -751,6 +751,7 @@ public class KuaishouBatchCampaignPreviewServiceImpl extends ServiceImpl<Kuaisho
         groupPreview.setMedia(groupJson.getString("media"));
         groupPreview.setExcludeMedia(groupJson.getString("excludeMedia"));
         groupPreview.setMediaSourceType(groupJson.getInteger("mediaSourceType"));
+        groupPreview.setSplashAdSwitch(groupJson.getInteger("splashAdSwitch"));
         return groupPreview;
     }
 

+ 106 - 3
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouBatchCreativePreviewServiceImpl.java

@@ -313,6 +313,11 @@ public class KuaishouBatchCreativePreviewServiceImpl extends ServiceImpl<Kuaisho
                 }
             }
 
+            // 是否投放开屏广告位  true:投放,false:不投放
+            Integer splashAdSwitch = groupPreview.getSplashAdSwitch();
+            if (!Check.isNull(splashAdSwitch)) {
+                unitJson.put("splash_ad_switch", splashAdSwitch == 1);
+            }
             // 试玩 ID
             Long playableId = groupPreview.getPlayableId();
             if (!Check.isNull(playableId)) {
@@ -370,7 +375,11 @@ public class KuaishouBatchCreativePreviewServiceImpl extends ServiceImpl<Kuaisho
                     updateStatus.setMessage((String) returnUnitMap.get("message"));
                     updateStatus.setUnitId(unitId);
                     if (groupPreview.getUnitType() == 4) {
-                        createCopyCreatives(token, groupPreview.getKuaishouBatchCreativePreviews(), unitId, campaignId);
+                        if (scene_id.toJSONString().contains("27") && groupPreview.getSplashAdSwitch() == 1) {//27:开屏广告位
+                            createMoreCreative(token, groupPreview.getKuaishouBatchCreativePreviews(), unitId, campaignId);
+                        } else {
+                            createCopyCreatives(token, groupPreview.getKuaishouBatchCreativePreviews(), unitId, campaignId);
+                        }
                     } else {
                         createCopyProgramCreatives(token, groupPreview.getKuaishouBatchCreativePreviews(), unitId, campaignId);
                     }
@@ -476,13 +485,14 @@ public class KuaishouBatchCreativePreviewServiceImpl extends ServiceImpl<Kuaisho
             }
 
             Map<String, Object> creativeMap = kuaishouInterfaceService.creativeCreate(oauthToken.getAccessToken(), oauthToken.getAccountId(), createJson, 1);
+
             JSONObject returnJson = new JSONObject();
             Integer code = (Integer) creativeMap.get("code");
             if (code == 0) {
                 Long creativeId = (Long) creativeMap.get("creativeId");
                 updateStatus.setIsSuccess(1);
                 updateStatus.setMessage((String) creativeMap.get("message"));
-                updateStatus.setCreativeId(creativeId);
+                updateStatus.setCreativeId(creativeId + "");
             } else {
                 updateStatus.setIsSuccess(0);
                 updateStatus.setMessage((String) creativeMap.get("message"));
@@ -496,6 +506,99 @@ public class KuaishouBatchCreativePreviewServiceImpl extends ServiceImpl<Kuaisho
     }
 
     /**
+     * 根据预览数据创建广告创意(批量)
+     */
+    private void createMoreCreative(CtopOauthToken oauthToken, List<KuaishouBatchCreativePreview> creativePreviewList, Long campaignId, Long unitId) throws Exception {
+        KuaishouBatchCreativePreview updateStatus = new KuaishouBatchCreativePreview();
+        updateStatus.setCampaignId(campaignId);
+        updateStatus.setUnitId(unitId);
+        KuaishouBatchCreativePreview creativePreview = creativePreviewList.get(0);
+        try {
+            JSONObject creativeJson = new JSONObject();
+            creativeJson.put("advertiser_id", oauthToken.getAccountId());
+            creativeJson.put("unit_id", unitId);
+            if (!Check.isNull(creativePreview.getClickTrackUrl())) {
+                creativeJson.put("click_track_url", creativePreview.getClickTrackUrl());  // 第三方点击检测链接
+            }
+            if (!Check.isNull(creativePreview.getImpressionUrl())) {
+                creativeJson.put("impression_url", creativePreview.getImpressionUrl());  // 第三方开始播放监测链接
+            }
+            if (!Check.isNull(creativePreview.getAdPhotoPlayedT3sUrl())) {
+                creativeJson.put("ad_photo_played_t3s_url", creativePreview.getAdPhotoPlayedT3sUrl());  // 第三方有效播放监测链接
+            }
+            if (!Check.isNull(creativePreview.getActionbarClickUrl())) {
+                creativeJson.put("actionbar_click_url", creativePreview.getActionbarClickUrl());  // 第三方点击按钮监测链接
+            }
+            if (!Check.isNull(creativePreview.getCreativeCategory()) && !Check.isNull(creativePreview.getCreativeTag())) {
+                creativeJson.put("creative_category", creativePreview.getCreativeCategory());  // 创意分类
+                creativeJson.put("creative_tag", JSONObject.parseArray(creativePreview.getCreativeTag()));  // 创意标签
+            }
+
+            List<JSONObject> creatives = new ArrayList<>();
+            for (KuaishouBatchCreativePreview preview : creativePreviewList) {
+                JSONObject creative = new JSONObject();
+                creative.put("creative_name", creativePreview.getCreativeName()); // 创意名称
+                if (!Check.isNull(creativePreview.getPhotoId())) {
+                    creative.put("photo_id", creativePreview.getPhotoId());  // 视频ID
+                    KuaiShouVideoGet video = videoGetService.getVideoByPhotoId(Long.valueOf(creativePreview.getPhotoId()));
+                    if (Check.isNull(video)) {
+                        log.info("账户:{},photoId:{} 没有查询到视频,素材类型指定为竖版视频", oauthToken.getAccountId(), creativePreview.getPhotoId());
+                        creative.put("creative_material_type", 1);  // 素材类型
+                    } else {
+                        if (0 == video.getIsKaiPing()) {
+                            creative.put("creative_material_type", 11);// 11-开屏视频
+                            creative.put("splash_photo_ids", JSONObject.parseArray(creativePreview.getSplashPhotoIds()));  // 安卓下载中间页ID
+                        } else {
+                            creative.put("creative_material_type", video.getMaterialType());//1:竖版视频 2:横版视频
+                        }
+                    }
+                }
+                if (!Check.isNull(creativePreview.getImageTokens())) {
+                    creative.put("image_tokens", Arrays.asList(creativePreview.getImageTokens()));
+                    creative.put("creative_material_type", creativePreview.getMaterialType());
+                }
+                if (!Check.isNull(creativePreview.getActionBarText())) {
+                    creative.put("action_bar_text", creativePreview.getActionBarText());  // 行动号召按钮文案
+                }
+                if (!Check.isNull(creativePreview.getDescription())) {
+                    creative.put("description", creativePreview.getDescription());  // 广告语
+                }
+                if (!Check.isNull(creativePreview.getStickerTitle())) {
+                    creative.put("sticker_title", creativePreview.getStickerTitle());  // 封面广告语标题
+                }
+                if (!Check.isNull(creativePreview.getOverlayType())) {
+                    creative.put("overlay_type", creativePreview.getOverlayType());  // 贴纸样式类型
+                }
+                if (!Check.isNull(creativePreview.getSiteId())) {
+                    creative.put("site_id", creativePreview.getSiteId());  // 安卓下载中间页ID
+                }
+                creatives.add(creative);
+            }
+            creativeJson.put("creatives", creatives);
+            Map<String, Object> creativeMap = kuaishouInterfaceService.batchCreativeCreate(oauthToken.getAccessToken(), oauthToken.getAccountId(), creativeJson, 1, null);
+            JSONObject returnJson = new JSONObject();
+            Integer code = (Integer) creativeMap.get("code");
+            if (code == 0) {
+                JSONArray creativeIds = (JSONArray) creativeMap.get("ids");
+                updateStatus.setIsSuccess(1);
+                updateStatus.setMessage((String) creativeMap.get("message"));
+                updateStatus.setCreativeId(creativeIds.toJSONString());
+            } else {
+                updateStatus.setIsSuccess(0);
+                updateStatus.setMessage((String) creativeMap.get("message"));
+            }
+        } catch (Exception e) {
+            log.error("创建广告创意过程中调用快手接口异常", e);
+            updateStatus.setIsSuccess(0);
+            updateStatus.setMessage("创建广告创意过程中调用快手接口异常");
+        }
+        for (KuaishouBatchCreativePreview preview : creativePreviewList) {
+            updateStatus.setId(preview.getId());
+            creativePreviewMapper.updateById(updateStatus);
+        }
+    }
+
+    /**
      * 执行多线程创建程序化创意
      */
     private void createCopyProgramCreatives(CtopOauthToken token, List<KuaishouBatchCreativePreview> creativePreviewList, Long unitId, Long campaignId) {
@@ -580,7 +683,7 @@ public class KuaishouBatchCreativePreviewServiceImpl extends ServiceImpl<Kuaisho
                 Long creativeId = (Long) creativeMap.get("creativeId");
                 updateStatus.setIsSuccess(1);
                 updateStatus.setMessage((String) creativeMap.get("message"));
-                updateStatus.setCreativeId(creativeId);
+                updateStatus.setCreativeId(creativeId + "");
             } else {
                 updateStatus.setIsSuccess(0);
                 updateStatus.setMessage((String) creativeMap.get("message"));

+ 14 - 10
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -2184,16 +2184,16 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                     JSONObject dataJson = resultJson.getJSONObject("data");
                     if (!Check.isNull(dataJson)) {
                         Long creativeId = dataJson.getLong("creative_id");
-                        /*Thread thread = new Thread() {
+                        Thread thread = new Thread() {
                             @Override
                             public void run() {
                                 try {
                                     Thread.sleep(100);
                                     getCreativeByCreativeId(accessToken, advertiserId, creativeId);
-                                    //绑定落地页与广告组、创意的关系
-                                    if (!Check.isNull(requestJson.getLong("site_id"))) {
-                                        landpagePackageService.createLandPageAndUnit(requestJson.getLong("site_id"), creativeId, requestJson.getLong("unit_id"), advertiserId);
-                                    }
+//                                    //绑定落地页与广告组、创意的关系
+//                                    if (!Check.isNull(requestJson.getLong("site_id"))) {
+//                                        landpagePackageService.createLandPageAndUnit(requestJson.getLong("site_id"), creativeId, requestJson.getLong("unit_id"), advertiserId);
+//                                    }
                                 } catch (InterruptedException e) {
                                     e.printStackTrace();
                                 }
@@ -2201,7 +2201,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                             }
 
                         };
-                        thread.start();*/
+                        thread.start();
                         returnMap.put("code", 0);
                         returnMap.put("creativeId", creativeId);
                         returnMap.put("message", "success");
@@ -2268,6 +2268,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             JSONObject resultJson = JSONObject.parseObject(result);
             log.info("快手创建创意返回:accountId:{},返回结果{}", advertiserId, resultJson);
             if (!Check.isNull(resultJson)) {
+                String message = resultJson.getString("message");
                 Integer code = resultJson.getInteger("code");
                 if (code == 0) {
                     JSONObject dataJson = resultJson.getJSONObject("data");
@@ -2280,7 +2281,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                                     try {
                                         Thread.sleep(100);
                                         getCreativeByCreativeIds(accessToken, advertiserId, add_creative_ids);
-                                        createLandPageAndUnit(requestJson, add_creative_ids);
+//                                        createLandPageAndUnit(requestJson, add_creative_ids);
                                     } catch (InterruptedException e) {
                                         e.printStackTrace();
                                     }
@@ -2300,9 +2301,10 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                 } else {
                     if (code == 500000 && count <= 4) {
                         batchCreativeCreate(accessToken, advertiserId, requestJson, count + 1, userId);
-                    }
-                    if (code == 400001 && "/rest/openapi/v2/creative/batch/update调用已超日限,次日可恢复调用".equals(resultJson.getString("message"))) {
+                    } else if (code == 400001 && message.contains("已超日限")) {
                         overRunSendMessageService.creativeOverRunSendMessage(advertiserId, userId);
+                    }else if (message.contains("过于频繁")&& count <= 4) {
+                        batchCreativeCreate(accessToken, advertiserId, requestJson, count + 1, userId);
                     }
                     log.error("创建广告创意失败,advertiser_id:{},返回信息:{},入参:{}", advertiserId, resultJson, requestJson, count + 1);
                     returnMap.put("code", -1);
@@ -2745,7 +2747,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                 kuaiShouImageGet.setId(token.getAccountId() + kuaiShouImageGet.getImageToken());
                 kuaiShouImageGet.setAccountId(token.getAccountId());
 
-                Map<String, Integer> typeBySize= MaterialEnum.getTypeBySize(kuaiShouImageGet.getWidth(), kuaiShouImageGet.getHeight());
+                Map<String, Integer> typeBySize = MaterialEnum.getTypeBySize(kuaiShouImageGet.getWidth(), kuaiShouImageGet.getHeight());
                 if (!Check.isNullMap(typeBySize)) {
                     kuaiShouImageGet.setMaterialType(typeBySize.get("type"));
                 }
@@ -2899,6 +2901,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             requestJson.put("page_size", 500);
             String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), headers);
             JSONObject resultJson = JSONObject.parseObject(result);
+            System.out.println("入参:" + requestJson);
+            System.out.println("返回:" + resultJson);
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");
                 if (code == 0) {