浏览代码

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-boot

zhaoxian 4 年之前
父节点
当前提交
e6f0c24fb6

+ 9 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialAscriptionController.java

@@ -3,6 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.MaterialAscription;
 import cn.com.ctop.common.module.entity.MaterialAscription;
 import cn.com.ctop.common.module.service.IMaterialAscriptionService;
 import cn.com.ctop.common.module.service.IMaterialAscriptionService;
+import cn.com.ctop.common.module.utils.Check;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -118,7 +119,14 @@ public class MaterialAscriptionController {
         Result<MaterialAscription> result = new Result<>();
         Result<MaterialAscription> result = new Result<>();
         QueryWrapper<MaterialAscription> ascriptionQueryWrapper = new QueryWrapper<>();
         QueryWrapper<MaterialAscription> ascriptionQueryWrapper = new QueryWrapper<>();
         ascriptionQueryWrapper.eq("material_id", materialAscription.getMaterialId());
         ascriptionQueryWrapper.eq("material_id", materialAscription.getMaterialId());
-        boolean ok = materialAscriptionService.update(materialAscription, ascriptionQueryWrapper);
+        ascriptionQueryWrapper.last("limit 1");
+        MaterialAscription one = materialAscriptionService.getOne(ascriptionQueryWrapper);
+        boolean ok;
+        if (Check.isNull(one)) {
+            ok = materialAscriptionService.save(materialAscription);
+        } else {
+            ok = materialAscriptionService.update(materialAscription, ascriptionQueryWrapper);
+        }
         if (ok) {
         if (ok) {
             result.success("修改成功!");
             result.success("修改成功!");
         }
         }

+ 42 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -8,6 +8,7 @@ import cn.com.ctop.common.module.vo.ResFileDTO;
 import cn.com.ctop.crawler.modules.core.entity.CrawlerDouyinMusicTask;
 import cn.com.ctop.crawler.modules.core.entity.CrawlerDouyinMusicTask;
 import cn.com.ctop.crawler.modules.core.service.CrawlerDouyinMusicTaskService;
 import cn.com.ctop.crawler.modules.core.service.CrawlerDouyinMusicTaskService;
 import cn.com.ctop.crawler.modules.douyin.service.DouyinMusicService;
 import cn.com.ctop.crawler.modules.douyin.service.DouyinMusicService;
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouTemplate;
 import cn.com.ctop.kuaishou.modules.batch.service.*;
 import cn.com.ctop.kuaishou.modules.batch.service.*;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
@@ -15,6 +16,7 @@ import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataServ
 import cn.com.ctop.toutiao.modules.material.service.IBytedanceEffectVideoInfoService;
 import cn.com.ctop.toutiao.modules.material.service.IBytedanceEffectVideoInfoService;
 import cn.com.ctop.toutiao.modules.report.service.*;
 import cn.com.ctop.toutiao.modules.report.service.*;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 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.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -90,6 +92,46 @@ public class TestController {
     static ExecutorService suzhaoService = Executors.newFixedThreadPool(5);
     static ExecutorService suzhaoService = Executors.newFixedThreadPool(5);
     @Autowired
     @Autowired
     private IKuaiShouDailyAgentService dailyAgentService;
     private IKuaiShouDailyAgentService dailyAgentService;
+    @Autowired
+    private IKuaishouTemplateService templateService;
+
+
+    @GetMapping(value = "/updateTemplate")
+    public void updateTemplate(Long projectId, String startDate, String endDate) {
+
+        List<Long> list = new ArrayList();
+        list.add(7022550L);
+        list.add(7409586L);
+        list.add(5473041L);
+        list.add(5852766L);
+        list.add(6962896L);
+        list.add(7409919L);
+        for (int i = 0; i < list.size(); i++) {
+            Long accountId = list.get(i);
+            CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
+            templateService.getTemplateByAccountId(oauthToken.getAccountId(), oauthToken.getAccessToken(), 1);
+
+            QueryWrapper<KuaishouTemplate> queryWrapper = new QueryWrapper<>();
+            queryWrapper.eq("account_id", accountId);
+            List<KuaishouTemplate> list1 = templateService.list(queryWrapper);
+            if (!Check.isNull(list1)) {
+                for (KuaishouTemplate template : list1) {
+                    JSONObject param = new JSONObject();
+                    param.put("templateId", template.getTemplateId());
+                    param.put("accountId", template.getAccountId());
+                    param.put("templateName", template.getTemplateName());
+                    param.put("filterConvertedLevel", 5);
+                    templateService.updateTemplate(oauthToken.getAccountId(), oauthToken.getAccessToken(), param);
+
+                }
+
+            }
+
+
+        }
+
+
+    }
 
 
 
 
     @GetMapping(value = "/getCreativeByProjectId")
     @GetMapping(value = "/getCreativeByProjectId")

+ 1 - 12
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -401,7 +401,7 @@ public class SampleTest {
 
 
     @Test
     @Test
     public void execute() {
     public void execute() {
-        String accountIds = "1675239584963662,1676540490482759,1675237415468045";
+        String accountIds = "1675239584963662,1675237415468045";
         String[] arrays = accountIds.split(",");
         String[] arrays = accountIds.split(",");
         for (int i = 0; i < arrays.length; i++) {
         for (int i = 0; i < arrays.length; i++) {
             Long accountId = Long.parseLong(arrays[i]);
             Long accountId = Long.parseLong(arrays[i]);
@@ -411,17 +411,6 @@ public class SampleTest {
         }
         }
     }
     }
 
 
-    @Test
-    public void loadBytedanceData() {
-        String accountIds = "1676540490482759";
-        String[] arrays = accountIds.split(",");
-        for (int i = 0; i < arrays.length; i++) {
-            Long accountId = Long.parseLong(arrays[i]);
-            CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
-            load12Data(token);
-        }
-    }
-
     private void load12AccountData(CtopOauthToken token) {
     private void load12AccountData(CtopOauthToken token) {
         reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-12-01", "yyyy-MM-dd"), DateUtils.parseDate("2020-12-11", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
         reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-12-01", "yyyy-MM-dd"), DateUtils.parseDate("2020-12-11", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
         reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-12-11", "yyyy-MM-dd"), DateUtils.parseDate("2020-12-21", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
         reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-12-11", "yyyy-MM-dd"), DateUtils.parseDate("2020-12-21", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);

+ 1 - 0
module-common/src/main/java/cn/com/ctop/common/module/utils/KuaishouInterfaceConstant.java

@@ -83,6 +83,7 @@ public class KuaishouInterfaceConstant {
      * 创建定向模板
      * 创建定向模板
      */
      */
     public static final String TEMPLATE_CREATE = "/rest/openapi/v1/target/template/create";
     public static final String TEMPLATE_CREATE = "/rest/openapi/v1/target/template/create";
+    public static final String TEMPLATE_UPDATE = "/rest/openapi/v1/target/template/update";
     /**
     /**
      * 获取地域信息
      * 获取地域信息
      */
      */

+ 26 - 0
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaiShouAlarmRuleJob.java

@@ -0,0 +1,26 @@
+package cn.com.ctop.job.kuaishou.handler;
+
+
+import cn.com.ctop.alarm.modules.service.IRuleGroupService;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+public class KuaiShouAlarmRuleJob {
+    @Autowired
+    private IRuleGroupService ruleGroupService;
+
+    /**
+     * 定时任务
+     *
+     * @param
+     * @return
+     * @throws
+     * @author ZHAOXA
+     */
+    @XxlJob("kuaiShoualarmRuleJob")
+    public void execute() throws Exception {
+        ruleGroupService.checkRules();
+    }
+}

+ 43 - 0
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouAiSuzaoVideoJob.java

@@ -0,0 +1,43 @@
+package cn.com.ctop.job.kuaishou.handler;
+
+import cn.com.ctop.common.module.entity.CtopOauthToken;
+import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.kuaishou.modules.ai.entity.AiKuaishouAccountTargetTemplate;
+import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaishouAccountTargetTemplateService;
+import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaishouNewCreateCampaign;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import org.jeecg.common.util.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.List;
+
+@Component
+public class KuaishouAiSuzaoVideoJob {
+    @Autowired
+    private IKuaishouInterfaceService kuaishouInterfaceService;
+    @Autowired
+    IAiKuaishouNewCreateCampaign aiKuaishouNewCreateCampaign;
+    @Autowired
+    private IAiKuaishouAccountTargetTemplateService aiKuaishouAccountTargetTemplateService;
+    @Autowired
+    private ICtopOauthTokenService tokenService;
+    @XxlJob("kuaishouAiSuzaoVideoJob")
+    public void kuaishouAiSuzaoVideoJob() {
+        List<AiKuaishouAccountTargetTemplate> accountTargetTemplates = aiKuaishouAccountTargetTemplateService.getAllEffectTemplate();
+        if(null==accountTargetTemplates||accountTargetTemplates.isEmpty()){
+            return;
+        }
+        accountTargetTemplates.forEach(targetTemplate -> {
+            CtopOauthToken token = tokenService.getTokenByAccountId(targetTemplate.getAccountId());
+            int timeStart = -3;
+            int timeEnd = 0;
+            Long now = System.currentTimeMillis();
+            String startTime = DateUtils.formatDate(new Date(now + timeStart*60*1000),"yyyy-MM-dd HH:mm:ss");
+            String endTime = DateUtils.formatDate(new Date(now + timeEnd*60*1000),"yyyy-MM-dd HH:mm:ss");
+            kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, startTime,endTime);
+        });
+    }
+}

+ 1 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/KuaiShouMaterialControer.java

@@ -106,6 +106,7 @@ public class KuaiShouMaterialControer {
 
 
     @PostMapping(value = "/getHistoryVideoList")
     @PostMapping(value = "/getHistoryVideoList")
     public JSONObject getHistoryVideoList(@RequestBody JSONObject requestJson) {
     public JSONObject getHistoryVideoList(@RequestBody JSONObject requestJson) {
+        System.err.println(requestJson);
         JSONObject returnJson = new JSONObject();
         JSONObject returnJson = new JSONObject();
         try {
         try {
             if (Check.isNull(requestJson)) {
             if (Check.isNull(requestJson)) {

+ 2 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouNewCreateCampaignServiceImpl.java

@@ -68,14 +68,11 @@ public class AiKuaishouNewCreateCampaignServiceImpl implements IAiKuaishouNewCre
 
 
         // 2.2 执行 素造的 视频拉取服务,时间过滤执行 yyyy-MM-dd HH:mm:ss
         // 2.2 执行 素造的 视频拉取服务,时间过滤执行 yyyy-MM-dd HH:mm:ss
         // 时间差,单位为分钟
         // 时间差,单位为分钟
-        int timeStart = -25;
-        int timeEnd = -20;
+        int timeStart = -10;
+        int timeEnd = -5;
         Long now = System.currentTimeMillis();
         Long now = System.currentTimeMillis();
         String startTime = DateUtils.formatDate(new Date(now + timeStart*60*1000),"yyyy-MM-dd HH:mm:ss");
         String startTime = DateUtils.formatDate(new Date(now + timeStart*60*1000),"yyyy-MM-dd HH:mm:ss");
         String endTime = DateUtils.formatDate(new Date(now + timeEnd*60*1000),"yyyy-MM-dd HH:mm:ss");
         String endTime = DateUtils.formatDate(new Date(now + timeEnd*60*1000),"yyyy-MM-dd HH:mm:ss");
-        kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, startTime,endTime);
-
-
         // 3、获取5分钟内,ctop_kuaishou_video_get 的视频数据,记为 N,如果有数据则执行下面步骤
         // 3、获取5分钟内,ctop_kuaishou_video_get 的视频数据,记为 N,如果有数据则执行下面步骤
         List<KuaiShouVideoGet> newVideos = videoGetService.getNewVideoBetweenTime(accountId,startTime,endTime);
         List<KuaiShouVideoGet> newVideos = videoGetService.getNewVideoBetweenTime(accountId,startTime,endTime);
         int newVideosCnt = newVideos.size();
         int newVideosCnt = newVideos.size();

+ 3 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/KuaiShouCreateServiceImpl.java

@@ -155,7 +155,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                 } else {
                 } else {
                     JSONObject target = getTarget(groupCreateJson);
                     JSONObject target = getTarget(groupCreateJson);
                     if (!Check.isNull(target)) {
                     if (!Check.isNull(target)) {
-                        createJson.put("getTarget", target); // 定向数据
+                        createJson.put("target", target); // 定向数据
                     }
                     }
                 }
                 }
                 Map<String, Object> unitMap = iKuaishouInterfaceService.adUnitCreate(oauthToken.getAccessToken(), oauthToken.getAccountId(), createJson, 1);
                 Map<String, Object> unitMap = iKuaishouInterfaceService.adUnitCreate(oauthToken.getAccessToken(), oauthToken.getAccountId(), createJson, 1);
@@ -183,7 +183,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                 }
                 }
                 returnArr.add(returnJson);
                 returnArr.add(returnJson);
             }
             }
-            callback("url", returnArr);
+            callback("http://192.168.1.193:31012/ai_callback_add_group", returnArr);
         } catch (Exception e) {
         } catch (Exception e) {
             e.printStackTrace();
             e.printStackTrace();
             log.error("创建组错误!!!!!");
             log.error("创建组错误!!!!!");
@@ -292,7 +292,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
                 }
                 }
                 returnArr.add(returnJson);
                 returnArr.add(returnJson);
             }
             }
-            callback("url", returnArr);
+            callback("http://192.168.1.193:31012/ai_callback_add_creative", returnArr);
         } catch (Exception e) {
         } catch (Exception e) {
             e.printStackTrace();
             e.printStackTrace();
         }
         }

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

@@ -1,8 +1,10 @@
 package cn.com.ctop.kuaishou.modules.batch.service.impl;
 package cn.com.ctop.kuaishou.modules.batch.service.impl;
 
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
+import cn.com.ctop.common.module.entity.MaterialCutFrame;
 import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.enums.MaterialEnum;
 import cn.com.ctop.common.module.enums.MaterialEnum;
+import cn.com.ctop.common.module.service.IMaterialCutFrameService;
 import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.*;
 import cn.com.ctop.common.module.utils.*;
 import cn.com.ctop.kuaishou.modules.batch.entity.*;
 import cn.com.ctop.kuaishou.modules.batch.entity.*;
@@ -2922,7 +2924,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
         }
         }
         String result = HttpUtils.httpPostRequest(url, param, headers);
         String result = HttpUtils.httpPostRequest(url, param, headers);
         JSONObject resultJson = JSONObject.parseObject(result);
         JSONObject resultJson = JSONObject.parseObject(result);
-//        System.out.println(resultJson.toJSONString());
         if (Check.isNull(resultJson)) {
         if (Check.isNull(resultJson)) {
             return;
             return;
         }
         }
@@ -2973,12 +2974,12 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                 suZhaoService.submit(new Runnable() {
                 suZhaoService.submit(new Runnable() {
                     @Override
                     @Override
                     public void run() {
                     public void run() {
-                        videoGetService.getKeyFrame(token, accountId, md5, String.valueOf(photo_id));
-
+                        List<MaterialCutFrame> cutFrames = cutFrameService.getListByVideoSignature(md5);
+                        if(null==cutFrames||cutFrames.isEmpty()){
+                            videoGetService.getKeyFrame(token, accountId, md5, String.valueOf(photo_id));
+                        }
                     }
                     }
                 });
                 });
-
-
             }
             }
         }
         }
 
 
@@ -2986,6 +2987,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
 
 
     }
     }
 
 
+    @Autowired
+    private IMaterialCutFrameService cutFrameService;
     private static ExecutorService executorService = Executors.newFixedThreadPool(10);
     private static ExecutorService executorService = Executors.newFixedThreadPool(10);
 
 
     @Override
     @Override

+ 28 - 21
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouTemplateServiceImpl.java

@@ -346,8 +346,12 @@ public class KuaishouTemplateServiceImpl extends ServiceImpl<KuaishouTemplateMap
             }
             }
 
 
             JSONObject param = new JSONObject();
             JSONObject param = new JSONObject();
+            param.put("template_id", requestJson.getLong("templateId"));
             param.put("advertiser_id", accountId);
             param.put("advertiser_id", accountId);
-            param.put("template_name", requestJson.getString("templateName"));
+            if(!Check.isNull(requestJson.getString("templateName"))){
+                param.put("template_name", requestJson.getString("templateName"));
+            }
+
             JSONObject targetJson = new JSONObject();
             JSONObject targetJson = new JSONObject();
             if (!Check.isNull(requestJson.getJSONArray("region"))) {
             if (!Check.isNull(requestJson.getJSONArray("region"))) {
                 targetJson.put("region", requestJson.getJSONArray("region"));
                 targetJson.put("region", requestJson.getJSONArray("region"));
@@ -362,14 +366,11 @@ public class KuaishouTemplateServiceImpl extends ServiceImpl<KuaishouTemplateMap
                 targetJson.put("ages_range", requestJson.getJSONArray("agesRange"));
                 targetJson.put("ages_range", requestJson.getJSONArray("agesRange"));
             }
             }
 
 
-            JSONObject ageJson = new JSONObject();
-            if (!Check.isNull(requestJson.getInteger("min"))) {
+
+            if (!Check.isNull(requestJson.getInteger("min")) && !Check.isNull(requestJson.getInteger("max"))) {
+                JSONObject ageJson = new JSONObject();
                 ageJson.put("min", requestJson.getInteger("min"));
                 ageJson.put("min", requestJson.getInteger("min"));
-            }
-            if (!Check.isNull(requestJson.getInteger("max"))) {
                 ageJson.put("max", requestJson.getInteger("max"));
                 ageJson.put("max", requestJson.getInteger("max"));
-            }
-            if (!Check.isNull(ageJson)) {
                 targetJson.put("age", ageJson);
                 targetJson.put("age", ageJson);
             }
             }
 
 
@@ -424,23 +425,27 @@ public class KuaishouTemplateServiceImpl extends ServiceImpl<KuaishouTemplateMap
             if (!Check.isNull(requestJson.getJSONArray("excludePopulation"))) {
             if (!Check.isNull(requestJson.getJSONArray("excludePopulation"))) {
                 targetJson.put("exclude_population", requestJson.getJSONArray("excludePopulation"));
                 targetJson.put("exclude_population", requestJson.getJSONArray("excludePopulation"));
             }
             }
-            JSONObject intelliExtendJson = new JSONObject();
+
 
 
             if (!Check.isNull(requestJson.getInteger("isOpen"))) {
             if (!Check.isNull(requestJson.getInteger("isOpen"))) {
+                JSONObject intelliExtendJson = new JSONObject();
                 intelliExtendJson.put("is_open", requestJson.getInteger("isOpen"));
                 intelliExtendJson.put("is_open", requestJson.getInteger("isOpen"));
+
+                if (!Check.isNull(requestJson.getInteger("noAgeBreak"))) {
+                    intelliExtendJson.put("no_age_break", requestJson.getInteger("noAgeBreak"));
+                }
+                if (!Check.isNull(requestJson.getInteger("noGenderBreak"))) {
+                    intelliExtendJson.put("no_gender_break", requestJson.getInteger("noGenderBreak"));
+                }
+                if (!Check.isNull(requestJson.getInteger("noAreaBreak"))) {
+                    intelliExtendJson.put("no_area_break", requestJson.getInteger("noAreaBreak"));
+                }
+                if (!Check.isNull(intelliExtendJson)) {
+                    targetJson.put("intelli_extend", intelliExtendJson);
+                }
+
             }
             }
-            if (!Check.isNull(requestJson.getInteger("noAgeBreak"))) {
-                intelliExtendJson.put("no_age_break", requestJson.getInteger("noAgeBreak"));
-            }
-            if (!Check.isNull(requestJson.getInteger("noGenderBreak"))) {
-                intelliExtendJson.put("no_gender_break", requestJson.getInteger("noGenderBreak"));
-            }
-            if (!Check.isNull(requestJson.getInteger("noAreaBreak"))) {
-                intelliExtendJson.put("no_area_break", requestJson.getInteger("noAreaBreak"));
-            }
-            if (!Check.isNull(intelliExtendJson)) {
-                targetJson.put("intelli_extend", intelliExtendJson);
-            }
+
             if (!Check.isNull(targetJson)) {
             if (!Check.isNull(targetJson)) {
                 param.put("target", targetJson);
                 param.put("target", targetJson);
             }
             }
@@ -448,9 +453,11 @@ public class KuaishouTemplateServiceImpl extends ServiceImpl<KuaishouTemplateMap
             Map<String, String> headers = new HashMap<String, String>();
             Map<String, String> headers = new HashMap<String, String>();
             headers.put("Access-Token", accessToken);
             headers.put("Access-Token", accessToken);
             headers.put("Content-Type", " application/json");
             headers.put("Content-Type", " application/json");
-            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.TEMPLATE_CREATE;
+            System.err.println("入参:" + param.toJSONString());
+            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.TEMPLATE_UPDATE;
             String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
             String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
             JSONObject resultJson = JSONObject.parseObject(result);
             JSONObject resultJson = JSONObject.parseObject(result);
+            System.err.println("返回:" + resultJson.toJSONString());
             if (!Check.isNull(resultJson)) {
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");
                 Integer code = resultJson.getInteger("code");
                 if (code == 0) {
                 if (code == 0) {

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

@@ -24,10 +24,8 @@ public class KuaiShouGetAccountFundServiceImpl implements IKuaiShouGetAccountFun
         Map<String, String> headers = new HashMap<>();
         Map<String, String> headers = new HashMap<>();
         headers.put("Content-Type", "application/json");
         headers.put("Content-Type", "application/json");
         headers.put("Access-Token", token.getAccessToken());
         headers.put("Access-Token", token.getAccessToken());
-
         JSONObject params=new JSONObject();
         JSONObject params=new JSONObject();
         params.put("advertiser_id",advertiserId);
         params.put("advertiser_id",advertiserId);
-
         JSONObject jsonObject = JSONObject.parseObject(HttpUtils.httpGetRequest("https://ad.e.kuaishou.com/rest/openapi/v1/advertiser/fund/get", headers,params));
         JSONObject jsonObject = JSONObject.parseObject(HttpUtils.httpGetRequest("https://ad.e.kuaishou.com/rest/openapi/v1/advertiser/fund/get", headers,params));
         if(jsonObject.getInteger("code")!=0){
         if(jsonObject.getInteger("code")!=0){
             XxlJobHelper.log("查询账户余额失败==》accountId:{},message:{}", token.getAccountId(), jsonObject.getString("message"));
             XxlJobHelper.log("查询账户余额失败==》accountId:{},message:{}", token.getAccountId(), jsonObject.getString("message"));
@@ -38,7 +36,6 @@ public class KuaiShouGetAccountFundServiceImpl implements IKuaiShouGetAccountFun
 
 
     @Override
     @Override
     public JSONObject getAccountReportBy(CtopOauthToken token, Long advertiserId) {
     public JSONObject getAccountReportBy(CtopOauthToken token, Long advertiserId) {
-
         JSONObject result= new JSONObject();
         JSONObject result= new JSONObject();
         Map<String, String> headers = new HashMap<>();
         Map<String, String> headers = new HashMap<>();
         headers.put("Content-Type", "application/json");
         headers.put("Content-Type", "application/json");