Browse Source

Merge remote-tracking branch 'origin/master' into master_batch

# Conflicts:
#	jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
#	jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
#	module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouReportDailyMaterialMapper.xml
#	module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouHistoryReportTaskService.java
#	module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouHistoryReportTaskServiceImpl.java
yumeng 5 years ago
parent
commit
946fe00767
14 changed files with 750 additions and 174 deletions
  1. 33 8
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  2. 16 8
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  3. 1 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/BindAccountAuthServiceImpl.java
  4. 45 0
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouGroupDailyReportJob.java
  5. 29 0
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouMaterialSyncMd5Job.java
  6. 3 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouReportDailyMaterialMapper.java
  7. 18 4
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouReportDailyMaterialMapper.xml
  8. 3 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouHistoryReportTaskService.java
  9. 16 19
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouDailyReportTaskServiceImpl.java
  10. 92 51
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouHistoryReportTaskServiceImpl.java
  11. 17 8
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java
  12. 84 74
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/entity/KuaishouReportDailyGroup.java
  13. 2 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouReportDailyGroupMapper.java
  14. 391 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyGroupMapper.xml

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

@@ -79,26 +79,51 @@ public class TestController {
     @Autowired
     private CrawlerDouyinMusicTaskService crawlerDouyinMusicTaskService;
     @Autowired
-    private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
-    @Autowired
     private MusicInfoService musicInfoService;
+    @Autowired
+    private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
 
     static ExecutorService executorService = Executors.newFixedThreadPool(15);
     static ExecutorService videoService = Executors.newFixedThreadPool(5);
-    static ExecutorService suzhaoService = Executors.newFixedThreadPool(5);
+    static ExecutorService suzhaoService = Executors.newFixedThreadPool(10);
 
 
-    @GetMapping(value = "/getVideoReport")
-    public void getVideoReport() {
-        kuaiShouHistoryReportTaskService.getTaskList();
+    @GetMapping(value = "/dailyReport")
+    public void dailyReport() {
+        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_KUAISHOU);
+        if (null == tokens || tokens.size() <= 0) {
+            log.info("定时获取快手数据异常:未获取到可用的token");
+        }
+        for (CtopOauthToken token : tokens) {
+            dailyReportTaskService.getTaskList(token.getAccountId(), token.getAccessToken(), "2020-09-20");
+        }
     }
 
-
     @GetMapping(value = "/getMd5")
     public void getMd5() {
-        kuaiShouHistoryReportTaskService.getMd5();
+        kuaiShouHistoryReportTaskService.getMd5(null, null);
+
     }
 
+    @GetMapping(value = "/getGroupReport")
+    public void getGroupReport() throws ParseException {
+        List<CtopOauthToken> tokens = oauthTokenService.selectKuaiShouToken();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date parse1 = simpleDateFormat.parse("2020-09-12");
+        Date parse2 = simpleDateFormat.parse("2020-09-17");
+        for (CtopOauthToken token : tokens) {
+
+            suzhaoService.submit(new Runnable() {
+                @Override
+                public void run() {
+                    //1: 获取广告主信息数据
+                    kuaishouInterfaceService.getAdvertiserGroupReportDaily(token, parse1, parse2);
+                }
+            });
+
+
+        }
+    }
 
 
     @GetMapping(value = "/syncDouyinMusicAsc")

+ 16 - 8
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -10,7 +10,6 @@ import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.message.handle.impl.EmailSendMsgHandle;
 import cn.com.ctop.common.module.service.*;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouActionBarTextService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyReportTaskService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
@@ -32,6 +31,8 @@ import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.context.junit4.SpringRunner;
 
 import java.io.File;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -68,15 +69,22 @@ public class SampleTest {
     @Autowired
     private IWechatCheckinDataService wechatCheckinDataService;
     @Autowired
-    private IKuaiShouActionBarTextService kuaiShouActionBarTextService;
+    private ICtopOauthTokenService tokenService;
 
 
     @Test
-    public void getDepartment() {
-        // wechatCheckinDataService.getCheckinData();
+    public void getDepartment() throws ParseException {
+        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date parse1 = simpleDateFormat.parse("2020-09-12");
+        Date parse2 = simpleDateFormat.parse("2020-09-17");
+        for (CtopOauthToken token : tokens) {
 
-        kuaiShouActionBarTextService.getActionBarText();
+            kuaishouInterfaceService.getAdvertiserGroupReportDaily(token, parse1, parse2);
 
+        }
+
+    //    wechatCheckinDataService.getCheckinData();
         //  wechatUserInfoService.getUserList();
         // wechatDepartment.getDepartment();
         // kuaishouInterfaceService.getSuZaoList("a34853c230e1b949eddbe569023dbc40", 7022550L, 1, "2020-09-15", "2020-09-16");
@@ -89,10 +97,10 @@ public class SampleTest {
         QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("media_id", 2);
         List<CtopOauthToken> list = oauthTokenService.list(queryWrapper);
-        for (CtopOauthToken token : list) {
-            kuaiShouHistoryReportTaskService.createTask(token.getAccountId(), token.getAccessToken(), "2020-03-17", "2020-09-17", "history");
+         for (CtopOauthToken token : list) {
+        kuaiShouHistoryReportTaskService.createTask(token.getAccountId(), token.getAccessToken(), "2020-09-20", "2020-09-20", "daily");
 
-        }
+         }
 
     }
 

+ 1 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/BindAccountAuthServiceImpl.java

@@ -92,6 +92,7 @@ public class BindAccountAuthServiceImpl extends ServiceImpl<BindAccountAuthMappe
                 .append(BytedanceInterfaceConstant.AUTH_PATH)
                 .append("?app_id=" + PropertiesUtils.getValue("bytedance_config", "bytedance_appid"))
                 .append("&state=" + URLEncoder.encode(state))
+                .append("&material_auth=1")
                 .append("&redirect_uri=" + URLEncoder.encode(PropertiesUtils.getValue("bytedance_config", "bytedance_callback_url"), "UTF-8"));
         return sb.toString();
     }

+ 45 - 0
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouGroupDailyReportJob.java

@@ -0,0 +1,45 @@
+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.batch.service.IKuaishouInterfaceService;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import com.xxl.job.core.log.XxlJobLogger;
+import org.jeecg.common.util.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+@Component
+public class KuaishouGroupDailyReportJob {
+    @Autowired
+    private ICtopOauthTokenService tokenService;
+    @Autowired
+    private IKuaishouInterfaceService kuaishouInterfaceService;
+
+    static ExecutorService executorService = Executors.newFixedThreadPool(5);
+
+    @XxlJob("kuaishouGroupDailyReportJob")
+    public ReturnT<String> execute(String param) throws ParseException {
+        String date = DateUtils.getDate("yyyy-MM-dd");
+        String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", date, -1);
+        String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", date, -2);
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date parse = simpleDateFormat.parse(startDate);
+        Date parse2 = simpleDateFormat.parse(endDate);
+        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
+        tokens.forEach(token -> executorService.submit(() ->
+                kuaishouInterfaceService.getAdvertiserGroupReportDaily(token, parse, parse2))
+        );
+        XxlJobLogger.log("快手物料数据同步完成");
+        return ReturnT.SUCCESS;
+    }
+
+}

+ 29 - 0
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouMaterialSyncMd5Job.java

@@ -0,0 +1,29 @@
+package cn.com.ctop.job.kuaishou.handler;
+
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
+import com.xxl.job.core.biz.model.ReturnT;
+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 static org.jeecg.common.util.DateUtils.getAnotherDay;
+
+/**
+ * 检查前一天md5为空的数据
+ *
+ * @author yumeng
+ */
+@Component
+public class KuaishouMaterialSyncMd5Job {
+    @Autowired
+    private IKuaiShouHistoryReportTaskService historyReportTaskService;
+
+    @XxlJob("kuaishouMaterialSyncMd5Job")
+    public ReturnT<String> execute(String param) throws Exception {
+        String nowDate = DateUtils.getDate("yyyy-MM-dd");
+        String statDate = getAnotherDay("yyyy-MM-dd", nowDate, -1);
+        historyReportTaskService.getMd5V2(statDate);
+        return ReturnT.SUCCESS;
+    }
+}

+ 3 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouReportDailyMaterialMapper.java

@@ -20,5 +20,7 @@ public interface KuaiShouReportDailyMaterialMapper extends BaseMapper<KuaiShouRe
 
     List<KuaiShouReportDailyMaterialVo> getPhotoList(@Param("accountId") Long accountId, @Param("statDate") String statDate);
 
-    VideoGetvo getVideoGetByPhotoId(Long photoId);
+    VideoGetvo getVideoGetByPhotoId(@Param("photoId") Long photoId);
+
+    List<KuaiShouReportDailyMaterialVo> getPhotoListByDate(@Param("statDate") String statDate);
 }

+ 18 - 4
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouReportDailyMaterialMapper.xml

@@ -108,15 +108,28 @@
     </insert>
 
     <select id="getPhotoList" resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterialVo">
+           select
+           id as id,
+           photo_id as photoId
+           from
+           ctop_kuaishou_report_daily_material
+           where account_id = #{accountId}
+           <if test="statDate != null and statDate != '' ">
+               and stat_date = #{statDate}
+           </if>
+           group by photo_id
+
+    </select>
+
+    <select id="getPhotoListByDate"
+            resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterialVo">
         select
         id as id,
         photo_id as photoId
         from
         ctop_kuaishou_report_daily_material
-        where account_id = #{accountId}
-        <if test="statDate != null and statDate != '' ">
-            and stat_date = #{statDate}
-        </if>
+        WHERE stat_date = #{statDate}
+        and signature is null
         group by photo_id
     </select>
 
@@ -126,6 +139,7 @@
       channel_type as 'channelType'
       from ctop_kuaishou_video_get
       where photo_id = #{photoId}
+      and signature is not null
       limit 1
     </select>
 

+ 3 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouHistoryReportTaskService.java

@@ -15,5 +15,7 @@ public interface IKuaiShouHistoryReportTaskService extends IService<KuaiShouHist
 
     void getTaskList();
 
-    void getMd5();
+    void getMd5(String statDate, Long accountId);
+
+    void getMd5V2(String statDate);
 }

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

@@ -5,9 +5,7 @@ import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouDailyReportTask;
 import cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouDailyReportTaskMapper;
 import cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouReportDailyMaterialMapper;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyReportTaskService;
-import cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterial;
-import cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterialVo;
-import cn.com.ctop.kuaishou.modules.report.entity.VideoGetvo;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyCampaignMapper;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyCreativeMapper;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyGroupMapper;
@@ -50,6 +48,8 @@ public class KuaiShouDailyReportTaskServiceImpl extends ServiceImpl<KuaiShouDail
     private KuaishouReportDailyCreativeMapper reportDailyCreativeMapper;
     @Autowired
     private KuaiShouReportDailyMaterialMapper kuaishouReportDailyMaterialMapper;
+    @Autowired
+    private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
 
     @Override
     public void formatCreativeDailyReportData(Long accountId, String statDate) {
@@ -132,31 +132,28 @@ public class KuaiShouDailyReportTaskServiceImpl extends ServiceImpl<KuaiShouDail
 
                 } else if (task.getViewType() == 4) {
                     reportDailyCreativeMapper.loadCreativeDailyReport(task.getAccountId(), localPath);
-                    Thread.sleep(1 * 1000);
-                    reportDailyCreativeMapper.formatCreativeDailyReportData(task.getAccountId(), task.getStatDate());
+                  /*  Thread.sleep(1 * 1000);
+                    reportDailyCreativeMapper.formatCreativeDailyReportData(task.getAccountId(), task.getStatDate());*/
                 } else if (task.getViewType() == 10) {
                     XxlJobLogger.log("下载文件,accountId:{}", task.getAccountId());
                     reportDailyCreativeMapper.loadProgramCreativeDailyReport(task.getAccountId(), localPath);
                     XxlJobLogger.log("下载结束,accountId:{}", task.getAccountId());
                 } else if (task.getViewType() == 5) {
                     kuaishouReportDailyMaterialMapper.loadMaterialDailyReport(task.getAccountId(), localPath);
-
-                    List<KuaiShouReportDailyMaterialVo> list = kuaishouReportDailyMaterialMapper.getPhotoList(task.getAccountId(), task.getStatDate());
-                    if (!Check.isNull(list)) {
-                        for (KuaiShouReportDailyMaterialVo materialVo : list) {
-                            Long id = materialVo.getId();
-                            Long photoId = materialVo.getPhotoId();
-                            VideoGetvo videoGetvo = kuaishouReportDailyMaterialMapper.getVideoGetByPhotoId(photoId);
-                            if (!Check.isNull(videoGetvo)) {
-                                KuaiShouReportDailyMaterial material = new KuaiShouReportDailyMaterial();
-                                material.setId(id);
-                                material.setSignature(videoGetvo.getSignature());
-                                material.setChannelType(videoGetvo.getChannelType());
-                                kuaishouReportDailyMaterialMapper.updateById(material);
+                    Thread thread = new Thread() {
+                        @Override
+                        public void run() {
+                            try {
+                                Thread.sleep(1 * 1000L);
+                                kuaiShouHistoryReportTaskService.getMd5(task.getStatDate(), task.getAccountId());
+                            } catch (InterruptedException e) {
+                                e.printStackTrace();
                             }
+
                         }
 
-                    }
+                    };
+                    thread.start();
 
 
                 }

+ 92 - 51
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouHistoryReportTaskServiceImpl.java

@@ -110,7 +110,7 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
                             dailyReportTask.setTaskName(taskName);
                             dailyReportTaskService.save(dailyReportTask);
                         } else {
-                            log.error("快手历史报表请求失败,accountId:{},返回数据:{}", accountId, resultJson);
+                            log.error("快手分天报表请求失败,accountId:{},返回数据:{}", accountId, resultJson);
                         }
                     }
                 }
@@ -209,8 +209,6 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
     }
 
 
-    static ExecutorService executorService = Executors.newFixedThreadPool(30);
-
     private void loadFile(String token, KuaiShouHistoryReportTask task) {
         try {
             String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.ASYNC_TASK_DOWNLOAD;
@@ -230,7 +228,7 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
 
                 } else if (task.getViewType() == 4) {
                     reportDailyCreativeMapper.loadCreativeDailyReport(task.getAccountId(), localPath);
-                    reportDailyCreativeMapper.formatCreativeDailyReportData(task.getAccountId(), null);
+                    // reportDailyCreativeMapper.formatCreativeDailyReportData(task.getAccountId(), null);
                 } else if (task.getViewType() == 10) {
                     XxlJobLogger.log("下载文件,accountId:{}", task.getAccountId());
                     reportDailyCreativeMapper.loadProgramCreativeDailyReport(task.getAccountId(), localPath);
@@ -239,7 +237,20 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
                 } else if (task.getViewType() == 5) {
                     kuaishouReportDailyMaterialMapper.loadMaterialDailyReport(task.getAccountId(), localPath);
 
+                    Thread thread = new Thread() {
+                        @Override
+                        public void run() {
+                            try {
+                                Thread.sleep(1 * 1000L);
+                                getMd5(null, task.getAccountId());
+                            } catch (InterruptedException e) {
+                                e.printStackTrace();
+                            }
+
+                        }
 
+                    };
+                    thread.start();
                 }
 
 
@@ -255,71 +266,101 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
     }
 
 
-    @Autowired
-    private ICtopOauthTokenService oauthTokenService;
+    private void getHistoryTypeList() {
 
-    @Override
-    public void getMd5() {
+        historyTypeList = new ArrayList<>();
+        historyTypeList.add(5);
+        historyTypeList.add(1);
+        historyTypeList.add(2);
+        historyTypeList.add(3);
+        historyTypeList.add(10);
+        historyTypeList.add(4);
 
-        QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("media_id", 2);
-        List<CtopOauthToken> list = oauthTokenService.list(queryWrapper);
-        for (CtopOauthToken token : list) {
 
+    }
 
-            List<KuaiShouReportDailyMaterialVo> photoList = kuaishouReportDailyMaterialMapper.getPhotoList(token.getAccountId(), null);
-            if (!Check.isNull(photoList)) {
-                for (KuaiShouReportDailyMaterialVo materialVo : photoList) {
-                    executorService.submit(new Runnable() {
-                        @Override
-                        public void run() {
-                            //        Long id = materialVo.getId();
-                            Long photoId = materialVo.getPhotoId();
-                            VideoGetvo videoGetvo = kuaishouReportDailyMaterialMapper.getVideoGetByPhotoId(photoId);
-                            if (!Check.isNull(videoGetvo)) {
-                                QueryWrapper<KuaiShouReportDailyMaterial> updateQueryWrapper = new QueryWrapper<>();
-                                updateQueryWrapper.eq("photo_id", photoId);
-                                KuaiShouReportDailyMaterial material = new KuaiShouReportDailyMaterial();
-                                material.setSignature(videoGetvo.getSignature());
-                                material.setChannelType(videoGetvo.getChannelType());
-                                kuaishouReportDailyMaterialMapper.update(material, updateQueryWrapper);
-                                log.info("修改成功:photoId:{}",photoId);
-                                // kuaishouReportDailyMaterialMapper.updateById(material);
+    private void getDailyTypeList() {
+        dailyTypeList = new ArrayList<>();
+        dailyTypeList.add(2);
+        dailyTypeList.add(3);
+        dailyTypeList.add(4);
+        dailyTypeList.add(5);
+        dailyTypeList.add(10);
+    }
+
+
+    static ExecutorService executorService = Executors.newFixedThreadPool(30);
+
+    @Autowired
+    private ICtopOauthTokenService oauthTokenService;
+
+    @Override
+    public void getMd5(String statDate, Long accountId) {
+        executorService.submit(new Runnable() {
+            @Override
+            public void run() {
+                List<KuaiShouReportDailyMaterialVo> photoList = kuaishouReportDailyMaterialMapper.getPhotoList(accountId, statDate);
+                if (!Check.isNull(photoList)) {
+                    for (KuaiShouReportDailyMaterialVo materialVo : photoList) {
+                        Long photoId = materialVo.getPhotoId();
+                        VideoGetvo videoGetvo = kuaishouReportDailyMaterialMapper.getVideoGetByPhotoId(photoId);
+                        if (!Check.isNull(videoGetvo)) {
+                            QueryWrapper<KuaiShouReportDailyMaterial> updateQueryWrapper = new QueryWrapper<>();
+                            updateQueryWrapper.eq("photo_id", photoId);
+                            if (!Check.isNull(statDate)) {
+                                updateQueryWrapper.eq("stat_date", statDate);
                             }
+
+                            updateQueryWrapper.isNull("signature");
+                            KuaiShouReportDailyMaterial material = new KuaiShouReportDailyMaterial();
+                            material.setSignature(videoGetvo.getSignature());
+                            material.setChannelType(videoGetvo.getChannelType());
+                            kuaishouReportDailyMaterialMapper.update(material, updateQueryWrapper);
+                            log.info("修改成功:photoId:{},accountId:{}", photoId, accountId);
                         }
-                    });
-                }
 
+                    }
+                }
             }
+        });
 
+    }
 
-        }
+    @Override
+    public void getMd5V2(String statDate) {
+        List<KuaiShouReportDailyMaterialVo> photoList = kuaishouReportDailyMaterialMapper.getPhotoListByDate(statDate);
+        XxlJobLogger.log("素材未匹配md5:数据长度:{}", photoList.size());
+        if (!Check.isNull(photoList)) {
+            for (KuaiShouReportDailyMaterialVo materialVo : photoList) {
+                executorService.submit(new Runnable() {
+                    @Override
+                    public void run() {
+                        Long photoId = materialVo.getPhotoId();
+                        VideoGetvo videoGetvo = kuaishouReportDailyMaterialMapper.getVideoGetByPhotoId(photoId);
+                        if (!Check.isNull(videoGetvo)) {
+                            QueryWrapper<KuaiShouReportDailyMaterial> updateQueryWrapper = new QueryWrapper<>();
+                            updateQueryWrapper.eq("photo_id", photoId);
+                            if (!Check.isNull(statDate)) {
+                                updateQueryWrapper.eq("stat_date", statDate);
+                            }
 
+                            KuaiShouReportDailyMaterial material = new KuaiShouReportDailyMaterial();
+                            material.setSignature(videoGetvo.getSignature());
+                            material.setChannelType(videoGetvo.getChannelType());
+                            kuaishouReportDailyMaterialMapper.update(material, updateQueryWrapper);
+                            XxlJobLogger.log("修改成功:photoId:{}", photoId);
 
-    }
+                        }
 
 
-    private void getHistoryTypeList() {
+                    }
+                });
 
-        historyTypeList = new ArrayList<>();
+            }
+        }
 
-    /*    historyTypeList.add(1);
-        historyTypeList.add(2);
-        historyTypeList.add(3);
-        historyTypeList.add(4);
-        historyTypeList.add(10);*/
-        historyTypeList.add(5);
 
     }
 
-    private void getDailyTypeList() {
-        dailyTypeList = new ArrayList<>();
-        dailyTypeList.add(5);
-        /*dailyTypeList.add(2);
-        dailyTypeList.add(3);
-        dailyTypeList.add(4);
-
-        dailyTypeList.add(10);*/
-    }
 
 }

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

@@ -16,6 +16,7 @@ import cn.com.ctop.kuaishou.modules.material.entity.KuaishouResultToken;
 import cn.com.ctop.kuaishou.modules.report.entity.*;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyAccountMapper;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyCampaignMapper;
+import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyGroupMapper;
 import cn.com.ctop.kuaishou.modules.report.service.*;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -103,6 +104,10 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     private IKuaishouReportDailyCampaignService dailyCampaignService;
     @Autowired
     private IKuaishouReportDailyGroupService dailyGroupService;
+
+    @Autowired
+    private KuaishouReportDailyGroupMapper dailyGroupMapper;
+
     @Autowired
     private IKuaishouReportHourlyGroupService hourlyGroupService;
     @Autowired
@@ -489,6 +494,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     }
 
     private void getAdvertiserGroupReportDailyByPage(CtopOauthToken token, Date startDate, Date endDate, int page) {
+        log.info("获取广告组日报,accountId:{},开始时间:{},结束时间:{}", token.getAccountId(), DateUtils.formatDate(startDate), DateUtils.formatDate(endDate));
         String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.GTOUP_REPORT;
         Map<String, String> headers = new HashMap<>();
         headers.put("Content-Type", "application/json");
@@ -522,14 +528,15 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
         }
         for (int i = 0; i < details.size(); i++) {
             var detailJson = details.getJSONObject(i);
-            var show = detailJson.getLong("show");
-            detailJson.put("photo_show", show);
-            var like = detailJson.getLong("like");
-            detailJson.put("photo_like", like);
+
+            detailJson.put("photo_share", detailJson.getString("share"));
+            detailJson.put("photo_comment", detailJson.getString("comment"));
+            detailJson.put("photo_like", detailJson.getString("like"));
+            detailJson.put("photo_show", detailJson.getString("show"));
+
             var dailyGroup = JSONObject.toJavaObject(detailJson, KuaishouReportDailyGroup.class);
             dailyGroup.setAccountId(token.getAccountId());
-            dailyGroup.setId("" + dailyGroup.getAccountId() + dailyGroup.getUnitId() + dailyGroup.getStatDate());
-            dailyGroupService.saveOrUpdate(dailyGroup);
+            dailyGroupMapper.insertSelective(dailyGroup);
         }
         getAdvertiserGroupReportDailyByPage(token, startDate, endDate, page + 1);
     }
@@ -557,8 +564,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             List<KuaishouReportDailyGroup> dailyGroups = kuaishouResult.getData().getDetails();
             dailyGroups.forEach((dailyGroup) -> {
                 dailyGroup.setAccountId(advertiserId);
-                dailyGroup.setId("" + dailyGroup.getAccountId() + dailyGroup.getUnitId() + dailyGroup.getStatDate());
-                dailyGroupService.saveOrUpdate(dailyGroup);
+                //  dailyGroup.setId("" + dailyGroup.getAccountId() + dailyGroup.getUnitId() + dailyGroup.getStatDate());
+                dailyGroupMapper.insertSelective(dailyGroup);
             });
         } catch (Exception e) {
             e.printStackTrace();
@@ -2751,6 +2758,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             JSONObject requestJson = new JSONObject();
             requestJson.put("advertiser_id", accountId);
             requestJson.put("status", 4);
+            requestJson.put("page", 1);
+            requestJson.put("page_size", 500);
             String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), headers);
             JSONObject resultJson = JSONObject.parseObject(result);
             if (!Check.isNull(resultJson)) {

+ 84 - 74
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/entity/KuaishouReportDailyGroup.java

@@ -1,9 +1,9 @@
 package cn.com.ctop.kuaishou.modules.report.entity;
 
-import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -14,118 +14,128 @@ import java.util.Date;
 @TableName("ctop_kuaishou_report_daily_group")
 public class KuaishouReportDailyGroup implements Serializable {
     private static final long serialVersionUID = 1L;
-    @TableId
-    private String id;
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
 
     private Long accountId;
 
+    private Long unitId;
+
     private Long campaignId;
-    private String campaignName;
 
-    @JsonProperty("unit_id")
-    private Long unitId;
     private String unitName;
-    private Integer status;
 
-    @JsonProperty("stat_date")
-    private String statDate;
+    private String campaignName;
+
+    private Integer status;
 
-    @JsonProperty
     private BigDecimal charge;
-    @JsonProperty
+
     private Long photoShow;
-    @JsonProperty("photo_click")
-    @TableField("photo_click")
-    private Long photoClick;
-    @JsonProperty
+
     private Long aclick;
-    @JsonProperty
+
     private Long bclick;
-    @JsonProperty
-    private Long share;
-    @JsonProperty
-    private Long comment;
-    @JsonProperty
+
+    private Long photoShare;
+
+    private Long photoComment;
+
     private Long photoLike;
-    @JsonProperty
+
     private Long follow;
-    @JsonProperty("cancel_follow")
+
     private Long cancelFollow;
-    @JsonProperty
+
     private Long report;
-    @JsonProperty
+
     private Long block;
-    @JsonProperty
+
     private Long negative;
-    @JsonProperty("download_started")
+
     private Long downloadStarted;
-    @JsonProperty("download_completed")
+
     private Long downloadCompleted;
-    @JsonProperty
+
     private Long activation;
-    @JsonProperty
+
     private Long submit;
 
-    @JsonProperty
-    private BigDecimal photoClickRatio;
-    @JsonProperty
-    private BigDecimal actionRatio;
-    @JsonProperty("impression_1k_cost")
-    @TableField("impression_1k_cost")
+    private String statDate;
+
+    private Long photoClick;
+
+    private Double photoClickRatio;
+
+    private Double actionRatio;
+
     private BigDecimal impression1kCost;
-    @JsonProperty
+
     private BigDecimal photoClickCost;
-    @JsonProperty
+
     private BigDecimal actionCost;
-    @JsonProperty
+
     private Long eventPayFirstDay;
-    @JsonProperty
-    private BigDecimal eventPayFirstDayRoi;
-    @JsonProperty
-    private BigDecimal eventPay;
-    @JsonProperty
+
+    private BigDecimal eventPayPurchaseAmountFirstDay;
+
+    private Double eventPayFirstDayRoi;
+
+    private Long eventPay;
+
     private BigDecimal eventPayPurchaseAmount;
-    @JsonProperty
-    private BigDecimal eventPayRoi;
-    @JsonProperty
+
+    private Double eventPayRoi;
+
     private Long eventRegister;
-    @JsonProperty
+
     private BigDecimal eventRegisterCost;
-    @JsonProperty
+
+    private Double eventRegisterRatio;
+
     private Long eventJinJianApp;
-    @JsonProperty
+
     private BigDecimal eventJinJianAppCost;
-    @JsonProperty
-    private BigDecimal eventPayPurchaseAmountFirstDay;
-    @JsonProperty
+
     private Long eventCreditGrantApp;
-    @JsonProperty
+
     private BigDecimal eventCreditGrantAppCost;
-    @JsonProperty
-    private BigDecimal eventCreditGrantAppRatio;
-    @JsonProperty
-    private BigDecimal eventOrderPaid;
-    @JsonProperty
+
+    private Double eventCreditGrantAppRatio;
+
+    private Long eventOrderPaid;
+
     private BigDecimal eventOrderPaidPurchaseAmount;
-    @JsonProperty
-    private BigDecimal eventOrderPaidCost;
-    @JsonProperty
-    private Long formCount;
-    @JsonProperty
-    private BigDecimal formCost;
-    @JsonProperty
-    private BigDecimal formActionRatio;
-    @JsonProperty
+
     private Long eventJinJianLandingPage;
-    @JsonProperty
+
     private BigDecimal eventJinJianLandingPageCost;
-    @JsonProperty
+
     private Long eventCreditGrantLandingPage;
-    @JsonProperty
+
     private BigDecimal eventCreditGrantLandingPageCost;
-    @JsonProperty
+
+    private Double eventCreditGrantLandingRatio;
+
+    private BigDecimal eventNextDayStayCost;
+
+    private Long eventNextDayStayRatio;
+
+    private Double formActionRatio;
+
+    private BigDecimal eventOrderPaidCost;
+
+    private Long eventNextDayStay;
+
+    private BigDecimal formCost;
+
+    private Long formCount;
+
+    private Double play3sRatio;
+
     private Date createTime;
-    @JsonProperty
+
     private Date updateTime;
 
     private String channelCode;

+ 2 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouReportDailyGroupMapper.java

@@ -12,4 +12,6 @@ public interface KuaishouReportDailyGroupMapper extends BaseMapper<KuaishouRepor
             "set channel_code = substring_index(unit_name, '-', 1) " +
             "where stat_date =#{date}")
     void formatChannelCode(@Param("date") String date);
+
+    int insertSelective(KuaishouReportDailyGroup record);
 }

+ 391 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyGroupMapper.xml

@@ -108,4 +108,395 @@
     </insert>
 
 
+
+
+
+
+
+
+
+
+
+    <insert id="insertSelective" parameterType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyGroup" >
+        replace into ctop_kuaishou_report_daily_group
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="id != null" >
+                id,
+            </if>
+            <if test="accountId != null" >
+                account_id,
+            </if>
+            <if test="unitId != null" >
+                unit_id,
+            </if>
+            <if test="campaignId != null" >
+                campaign_id,
+            </if>
+            <if test="status != null" >
+                status,
+            </if>
+            <if test="charge != null" >
+                charge,
+            </if>
+            <if test="photoShow != null" >
+                photo_show,
+            </if>
+            <if test="aclick != null" >
+                aclick,
+            </if>
+            <if test="bclick != null" >
+                bclick,
+            </if>
+            <if test="photoShare != null" >
+                photo_share,
+            </if>
+            <if test="photoComment != null" >
+                photo_comment,
+            </if>
+            <if test="photoLike != null" >
+                photo_like,
+            </if>
+            <if test="follow != null" >
+                follow,
+            </if>
+            <if test="cancelFollow != null" >
+                cancel_follow,
+            </if>
+            <if test="report != null" >
+                report,
+            </if>
+            <if test="block != null" >
+                block,
+            </if>
+            <if test="negative != null" >
+                negative,
+            </if>
+            <if test="downloadStarted != null" >
+                download_started,
+            </if>
+            <if test="downloadCompleted != null" >
+                download_completed,
+            </if>
+            <if test="activation != null" >
+                activation,
+            </if>
+            <if test="submit != null" >
+                submit,
+            </if>
+            <if test="statDate != null" >
+                stat_date,
+            </if>
+            <if test="photoClick != null" >
+                photo_click,
+            </if>
+            <if test="photoClickRatio != null" >
+                photo_click_ratio,
+            </if>
+            <if test="actionRatio != null" >
+                action_ratio,
+            </if>
+            <if test="impression1kCost != null" >
+                impression_1k_cost,
+            </if>
+            <if test="photoClickCost != null" >
+                photo_click_cost,
+            </if>
+            <if test="actionCost != null" >
+                action_cost,
+            </if>
+            <if test="eventPayFirstDay != null" >
+                event_pay_first_day,
+            </if>
+            <if test="eventPayPurchaseAmountFirstDay != null" >
+                event_pay_purchase_amount_first_day,
+            </if>
+            <if test="eventPayFirstDayRoi != null" >
+                event_pay_first_day_roi,
+            </if>
+            <if test="eventPay != null" >
+                event_pay,
+            </if>
+            <if test="eventPayPurchaseAmount != null" >
+                event_pay_purchase_amount,
+            </if>
+            <if test="eventPayRoi != null" >
+                event_pay_roi,
+            </if>
+            <if test="eventRegister != null" >
+                event_register,
+            </if>
+            <if test="eventRegisterCost != null" >
+                event_register_cost,
+            </if>
+            <if test="eventRegisterRatio != null" >
+                event_register_ratio,
+            </if>
+            <if test="eventJinJianApp != null" >
+                event_jin_jian_app,
+            </if>
+            <if test="eventJinJianAppCost != null" >
+                event_jin_jian_app_cost,
+            </if>
+            <if test="eventCreditGrantApp != null" >
+                event_credit_grant_app,
+            </if>
+            <if test="eventCreditGrantAppCost != null" >
+                event_credit_grant_app_cost,
+            </if>
+            <if test="eventCreditGrantAppRatio != null" >
+                event_credit_grant_app_ratio,
+            </if>
+            <if test="eventOrderPaid != null" >
+                event_order_paid,
+            </if>
+            <if test="eventOrderPaidPurchaseAmount != null" >
+                event_order_paid_purchase_amount,
+            </if>
+            <if test="eventJinJianLandingPage != null" >
+                event_jin_jian_landing_page,
+            </if>
+            <if test="eventJinJianLandingPageCost != null" >
+                event_jin_jian_landing_page_cost,
+            </if>
+            <if test="eventCreditGrantLandingPage != null" >
+                event_credit_grant_landing_page,
+            </if>
+            <if test="eventCreditGrantLandingPageCost != null" >
+                event_credit_grant_landing_page_cost,
+            </if>
+            <if test="eventCreditGrantLandingRatio != null" >
+                event_credit_grant_landing_ratio,
+            </if>
+            <if test="eventNextDayStayCost != null" >
+                event_next_day_stay_cost,
+            </if>
+            <if test="eventNextDayStayRatio != null" >
+                event_next_day_stay_ratio,
+            </if>
+            <if test="formActionRatio != null" >
+                form_action_ratio,
+            </if>
+            <if test="eventOrderPaidCost != null" >
+                event_order_paid_cost,
+            </if>
+            <if test="eventNextDayStay != null" >
+                event_next_day_stay,
+            </if>
+            <if test="formCost != null" >
+                form_cost,
+            </if>
+            <if test="formCount != null" >
+                form_count,
+            </if>
+            <if test="play3sRatio != null" >
+                play_3s_ratio,
+            </if>
+            <if test="createTime != null" >
+                create_time,
+            </if>
+            <if test="updateTime != null" >
+                update_time,
+            </if>
+            <if test="channelCode != null" >
+                channel_code,
+            </if>
+            <if test="unitName != null" >
+                unit_name,
+            </if>
+            <if test="campaignName != null" >
+                campaign_name,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="id != null" >
+                #{id,jdbcType=BIGINT},
+            </if>
+            <if test="accountId != null" >
+                #{accountId,jdbcType=BIGINT},
+            </if>
+            <if test="unitId != null" >
+                #{unitId,jdbcType=BIGINT},
+            </if>
+            <if test="campaignId != null" >
+                #{campaignId,jdbcType=BIGINT},
+            </if>
+            <if test="status != null" >
+                #{status,jdbcType=INTEGER},
+            </if>
+            <if test="charge != null" >
+                #{charge,jdbcType=DECIMAL},
+            </if>
+            <if test="photoShow != null" >
+                #{photoShow,jdbcType=BIGINT},
+            </if>
+            <if test="aclick != null" >
+                #{aclick,jdbcType=BIGINT},
+            </if>
+            <if test="bclick != null" >
+                #{bclick,jdbcType=BIGINT},
+            </if>
+            <if test="photoShare != null" >
+                #{photoShare,jdbcType=BIGINT},
+            </if>
+            <if test="photoComment != null" >
+                #{photoComment,jdbcType=BIGINT},
+            </if>
+            <if test="photoLike != null" >
+                #{photoLike,jdbcType=BIGINT},
+            </if>
+            <if test="follow != null" >
+                #{follow,jdbcType=BIGINT},
+            </if>
+            <if test="cancelFollow != null" >
+                #{cancelFollow,jdbcType=BIGINT},
+            </if>
+            <if test="report != null" >
+                #{report,jdbcType=BIGINT},
+            </if>
+            <if test="block != null" >
+                #{block,jdbcType=BIGINT},
+            </if>
+            <if test="negative != null" >
+                #{negative,jdbcType=BIGINT},
+            </if>
+            <if test="downloadStarted != null" >
+                #{downloadStarted,jdbcType=BIGINT},
+            </if>
+            <if test="downloadCompleted != null" >
+                #{downloadCompleted,jdbcType=BIGINT},
+            </if>
+            <if test="activation != null" >
+                #{activation,jdbcType=BIGINT},
+            </if>
+            <if test="submit != null" >
+                #{submit,jdbcType=BIGINT},
+            </if>
+            <if test="statDate != null" >
+                #{statDate,jdbcType=VARCHAR},
+            </if>
+            <if test="photoClick != null" >
+                #{photoClick,jdbcType=BIGINT},
+            </if>
+            <if test="photoClickRatio != null" >
+                #{photoClickRatio,jdbcType=DOUBLE},
+            </if>
+            <if test="actionRatio != null" >
+                #{actionRatio,jdbcType=DOUBLE},
+            </if>
+            <if test="impression1kCost != null" >
+                #{impression1kCost,jdbcType=DECIMAL},
+            </if>
+            <if test="photoClickCost != null" >
+                #{photoClickCost,jdbcType=DECIMAL},
+            </if>
+            <if test="actionCost != null" >
+                #{actionCost,jdbcType=DECIMAL},
+            </if>
+            <if test="eventPayFirstDay != null" >
+                #{eventPayFirstDay,jdbcType=BIGINT},
+            </if>
+            <if test="eventPayPurchaseAmountFirstDay != null" >
+                #{eventPayPurchaseAmountFirstDay,jdbcType=DECIMAL},
+            </if>
+            <if test="eventPayFirstDayRoi != null" >
+                #{eventPayFirstDayRoi,jdbcType=DOUBLE},
+            </if>
+            <if test="eventPay != null" >
+                #{eventPay,jdbcType=BIGINT},
+            </if>
+            <if test="eventPayPurchaseAmount != null" >
+                #{eventPayPurchaseAmount,jdbcType=DECIMAL},
+            </if>
+            <if test="eventPayRoi != null" >
+                #{eventPayRoi,jdbcType=DOUBLE},
+            </if>
+            <if test="eventRegister != null" >
+                #{eventRegister,jdbcType=BIGINT},
+            </if>
+            <if test="eventRegisterCost != null" >
+                #{eventRegisterCost,jdbcType=DECIMAL},
+            </if>
+            <if test="eventRegisterRatio != null" >
+                #{eventRegisterRatio,jdbcType=DOUBLE},
+            </if>
+            <if test="eventJinJianApp != null" >
+                #{eventJinJianApp,jdbcType=BIGINT},
+            </if>
+            <if test="eventJinJianAppCost != null" >
+                #{eventJinJianAppCost,jdbcType=DECIMAL},
+            </if>
+            <if test="eventCreditGrantApp != null" >
+                #{eventCreditGrantApp,jdbcType=BIGINT},
+            </if>
+            <if test="eventCreditGrantAppCost != null" >
+                #{eventCreditGrantAppCost,jdbcType=DECIMAL},
+            </if>
+            <if test="eventCreditGrantAppRatio != null" >
+                #{eventCreditGrantAppRatio,jdbcType=DOUBLE},
+            </if>
+            <if test="eventOrderPaid != null" >
+                #{eventOrderPaid,jdbcType=BIGINT},
+            </if>
+            <if test="eventOrderPaidPurchaseAmount != null" >
+                #{eventOrderPaidPurchaseAmount,jdbcType=DECIMAL},
+            </if>
+            <if test="eventJinJianLandingPage != null" >
+                #{eventJinJianLandingPage,jdbcType=BIGINT},
+            </if>
+            <if test="eventJinJianLandingPageCost != null" >
+                #{eventJinJianLandingPageCost,jdbcType=DECIMAL},
+            </if>
+            <if test="eventCreditGrantLandingPage != null" >
+                #{eventCreditGrantLandingPage,jdbcType=BIGINT},
+            </if>
+            <if test="eventCreditGrantLandingPageCost != null" >
+                #{eventCreditGrantLandingPageCost,jdbcType=DECIMAL},
+            </if>
+            <if test="eventCreditGrantLandingRatio != null" >
+                #{eventCreditGrantLandingRatio,jdbcType=DOUBLE},
+            </if>
+            <if test="eventNextDayStayCost != null" >
+                #{eventNextDayStayCost,jdbcType=DECIMAL},
+            </if>
+            <if test="eventNextDayStayRatio != null" >
+                #{eventNextDayStayRatio,jdbcType=BIGINT},
+            </if>
+            <if test="formActionRatio != null" >
+                #{formActionRatio,jdbcType=DOUBLE},
+            </if>
+            <if test="eventOrderPaidCost != null" >
+                #{eventOrderPaidCost,jdbcType=DECIMAL},
+            </if>
+            <if test="eventNextDayStay != null" >
+                #{eventNextDayStay,jdbcType=BIGINT},
+            </if>
+            <if test="formCost != null" >
+                #{formCost,jdbcType=DECIMAL},
+            </if>
+            <if test="formCount != null" >
+                #{formCount,jdbcType=BIGINT},
+            </if>
+            <if test="play3sRatio != null" >
+                #{play3sRatio,jdbcType=DOUBLE},
+            </if>
+            <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="channelCode != null" >
+                #{channelCode,jdbcType=VARCHAR},
+            </if>
+            <if test="unitName != null" >
+                #{unitName,jdbcType=LONGVARCHAR},
+            </if>
+            <if test="campaignName != null" >
+                #{campaignName,jdbcType=LONGVARCHAR},
+            </if>
+        </trim>
+    </insert>
+
+
+
 </mapper>