yumeng 4 年之前
父节点
当前提交
450dfd7ef9

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

@@ -83,16 +83,39 @@ public class TestController {
 
     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 = "/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")
-    public String syncDouyinMusicAsc(){
+    public String syncDouyinMusicAsc() {
         QueryWrapper<CrawlerDouyinMusicTask> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("status","init").orderByAsc("id").last(" limit 20");
+        queryWrapper.eq("status", "init").orderByAsc("id").last(" limit 20");
 
         List<CrawlerDouyinMusicTask> list = crawlerDouyinMusicTaskService.list(queryWrapper);
 
-        while (list != null){
-            for(CrawlerDouyinMusicTask crawlerDouyinMusicTask : list){
+        while (list != null) {
+            for (CrawlerDouyinMusicTask crawlerDouyinMusicTask : list) {
                 MusicInfo musicInfo = new MusicInfo();
                 musicInfo.setExtId(crawlerDouyinMusicTask.getId());
                 musicInfo = douyinMusicService.getMusicInfo(musicInfo);
@@ -104,19 +127,20 @@ public class TestController {
         }
         return "success";
     }
+
     @GetMapping(value = "/syncDouyinMusic")
-    public String syncDouyinMusic(){
-        for(int i =0;i<10;i++){
+    public String syncDouyinMusic() {
+        for (int i = 0; i < 10; i++) {
             final int j = i;
-            Thread thread = new Thread(){
+            Thread thread = new Thread() {
                 @Override
                 public void run() {
                     QueryWrapper<CrawlerDouyinMusicTask> queryWrapper = new QueryWrapper<>();
-                    queryWrapper.eq("status","init").likeLeft("id",j).orderByDesc("id").last(" limit 20");
+                    queryWrapper.eq("status", "init").likeLeft("id", j).orderByDesc("id").last(" limit 20");
                     List<CrawlerDouyinMusicTask> list = crawlerDouyinMusicTaskService.list(queryWrapper);
-                    while (list != null){
-                        log.info("【同步歌曲】第"+j+"线程正在处理:"+list.size()+"条数据");
-                        for(CrawlerDouyinMusicTask crawlerDouyinMusicTask : list){
+                    while (list != null) {
+                        log.info("【同步歌曲】第" + j + "线程正在处理:" + list.size() + "条数据");
+                        for (CrawlerDouyinMusicTask crawlerDouyinMusicTask : list) {
                             MusicInfo musicInfo = new MusicInfo();
                             musicInfo.setExtId(crawlerDouyinMusicTask.getId());
                             douyinMusicService.getMusicInfo(musicInfo);
@@ -130,23 +154,24 @@ public class TestController {
 
         return "success";
     }
+
     @GetMapping(value = "/parseDouyinMusic")
-    public String parseDouyinMusic(){
-        for(int i =0;i<10;i++){
+    public String parseDouyinMusic() {
+        for (int i = 0; i < 10; i++) {
             final int j = i;
-            Thread thread = new Thread(){
+            Thread thread = new Thread() {
                 @Override
                 public void run() {
                     QueryWrapper<CrawlerDouyinMusicTask> queryWrapper = new QueryWrapper<>();
-                    queryWrapper.eq("status","done").likeLeft("id",j).orderByDesc("id").last(" limit 20");
+                    queryWrapper.eq("status", "done").likeLeft("id", j).orderByDesc("id").last(" limit 20");
                     List<CrawlerDouyinMusicTask> list = crawlerDouyinMusicTaskService.list(queryWrapper);
-                    while (list != null){
-                        log.info("【解析分类】第"+j+"线程正在处理:"+list.size()+"条数据");
-                        for(CrawlerDouyinMusicTask crawlerDouyinMusicTask : list){
+                    while (list != null) {
+                        log.info("【解析分类】第" + j + "线程正在处理:" + list.size() + "条数据");
+                        for (CrawlerDouyinMusicTask crawlerDouyinMusicTask : list) {
                             QueryWrapper<MusicInfo> queryWrapper1 = new QueryWrapper<>();
-                            queryWrapper1.eq("ext_id",crawlerDouyinMusicTask.getId()).last(" limit 1");
+                            queryWrapper1.eq("ext_id", crawlerDouyinMusicTask.getId()).last(" limit 1");
                             MusicInfo musicInfo = musicInfoService.getOne(queryWrapper1);
-                            if(musicInfo != null){
+                            if (musicInfo != null) {
                                 douyinMusicService.parseTag(musicInfo);
                             }
                         }
@@ -159,8 +184,9 @@ public class TestController {
 
         return "success";
     }
+
     @GetMapping(value = "/testdouyinmusic")
-    public String testDouyinMusic(){
+    public String testDouyinMusic() {
         douyinMusicService.getHotMusicList();
         return "success";
     }
@@ -172,7 +198,7 @@ public class TestController {
 
             QueryWrapper<UserAllocation> userAllocationQueryWrapper = new QueryWrapper<>();
             userAllocationQueryWrapper.eq("project_id", projectId);
-           // userAllocationQueryWrapper.eq("account_status", 0);
+            // userAllocationQueryWrapper.eq("account_status", 0);
             List<UserAllocation> list = userAllocationService.list(userAllocationQueryWrapper);
             if (!Check.isNull(list)) {
                 for (UserAllocation allocation : list) {
@@ -205,7 +231,7 @@ public class TestController {
 
             QueryWrapper<UserAllocation> userAllocationQueryWrapper = new QueryWrapper<>();
             userAllocationQueryWrapper.eq("project_id", projectId);
-           // userAllocationQueryWrapper.eq("account_status", 0);
+            // userAllocationQueryWrapper.eq("account_status", 0);
             List<UserAllocation> list = userAllocationService.list(userAllocationQueryWrapper);
             if (!Check.isNull(list)) {
                 for (UserAllocation allocation : list) {

+ 19 - 5
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -31,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;
@@ -66,11 +68,23 @@ public class SampleTest {
     private IWechatUserListService wechatUserInfoService;
     @Autowired
     private IWechatCheckinDataService wechatCheckinDataService;
+    @Autowired
+    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) {
+
+            kuaishouInterfaceService.getAdvertiserGroupReportDaily(token, parse1, parse2);
+
+        }
+
+    //    wechatCheckinDataService.getCheckinData();
         //  wechatUserInfoService.getUserList();
         // wechatDepartment.getDepartment();
         // kuaishouInterfaceService.getSuZaoList("a34853c230e1b949eddbe569023dbc40", 7022550L, 1, "2020-09-15", "2020-09-16");
@@ -83,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(1872430L, "9cd4d43ea697ad9f2aa91fc0f4b921e5", "2020-03-15", "2020-09-15", "history");
+        // for (CtopOauthToken token : list) {
+        kuaiShouHistoryReportTaskService.createTask(1872430L, "9cd4d43ea697ad9f2aa91fc0f4b921e5", "2020-03-15", "2020-09-15", "history");
 
-       // }
+        // }
 
     }
 

+ 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;
+    }
+
+}

+ 15 - 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();

+ 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>