Преглед на файлове

Merge remote-tracking branch 'origin/V1.1.6' into V1.1.6

jiequan.bi преди 4 години
родител
ревизия
d13cacb641
променени са 22 файла, в които са добавени 1951 реда и са изтрити 10 реда
  1. 47 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  2. 248 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/AiCreativeLimitController.java
  3. 65 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/entity/AiCreativeLimit.java
  4. 17 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/AiCreativeLimitMapper.java
  5. 15 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/xml/AiCreativeLimitMapper.xml
  6. 15 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/IAiCreativeLimitService.java
  7. 26 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiCreativeLimitServiceImpl.java
  8. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaishouVideoRelateCreativesMapper.xml
  9. 8 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java
  10. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouAudienceReportDailyAgeMapper.java
  11. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouAudienceReportDailyBusinessMapper.java
  12. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouAudienceReportDailyCityMapper.java
  13. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouAudienceReportDailyClientMapper.java
  14. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouAudienceReportDailyGenderMapper.java
  15. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouAudienceReportDailyProvinceMapper.java
  16. 246 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouAudienceReportDailyAgeMapper.xml
  17. 246 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouAudienceReportDailyBusinessMapper.xml
  18. 245 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouAudienceReportDailyCityMapper.xml
  19. 246 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouAudienceReportDailyClientMapper.xml
  20. 246 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouAudienceReportDailyGenderMapper.xml
  21. 245 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouAudienceReportDailyProvinceMapper.xml
  22. 8 9
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouAudienceReportDailyServiceImpl.java

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

@@ -23,6 +23,7 @@ import cn.com.ctop.toutiao.modules.report.service.*;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.xxl.job.core.context.XxlJobHelper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.Param;
@@ -1230,4 +1231,50 @@ public class TestController {
     IETLReportBytedanceVideoService etlReportBytedanceVideoService;
 
 
+    @Autowired
+    private IKuaishouAudienceReportDailyService kuaishouAudienceReportDailyService;
+    @Autowired
+    private IKuaiShouGroupService kuaiShouGroupService;
+    @Autowired
+    private IKuaishouStrategyService kuaishouStrategyService;
+
+    /**
+     * 勿动勿删,煜一人群报表数据拉取接口。
+     *
+     * @param
+     * @return void
+     * @throws
+     * @author ZHAOXA
+     */
+    @PostMapping(value = "/getAudienceData")
+    public Result getAudienceData(@RequestBody JSONObject request) throws Exception {
+        Long accountId = request.getLong("accountId");
+        Long planId = request.getLong("planId");
+        Long unitId = request.getLong("unitId");
+        String type = request.getString("type");
+        String startTime = request.getString("startTime");
+        String endTime = request.getString("endTime");
+        if (Check.isNull(accountId) || Check.isNull(planId) || Check.isNull(unitId) || Check.isNull(type) || Check.isNull(endTime) || Check.isNull(startTime)) {
+            return Result.error("缺少参数");
+        }
+        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
+        List<String> dayList = new ArrayList<>();
+        if (startTime.equals(endTime)) {
+            dayList.add(startTime);
+        } else {
+            dayList = DateUtils.getDays(startTime, endTime);
+        }
+        ExecutorService executorServic1e = Executors.newFixedThreadPool(8);
+        int page = 1;
+        int pageSize = 2000;
+        dayList.forEach(date -> executorServic1e.submit(() -> {
+            try {
+                kuaishouAudienceReportDailyService.crowdAnalysisReport(token, date, type, planId, unitId, page, pageSize);
+                Thread.sleep(500);
+            } catch (InterruptedException e) {
+                log.error("获取人群消息异常", e);
+            }
+        }));
+        return Result.ok("success");
+    }
 }

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

@@ -0,0 +1,248 @@
+package cn.com.ctop.kuaishou.modules.ai.controller;
+
+import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
+import cn.com.ctop.kuaishou.modules.ai.entity.AiCreativeLimit;
+import cn.com.ctop.kuaishou.modules.ai.service.IAiCreativeLimitService;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 关联数超限
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2021-03-24
+ */
+@Slf4j
+@Api(tags = "关联数超限")
+@RestController
+@RequestMapping("/limit/aiCreativeLimit")
+public class AiCreativeLimitController {
+    @Autowired
+    private IAiCreativeLimitService aiCreativeLimitService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param aiCreativeLimit
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "关联数超限-分页列表查询")
+    @ApiOperation(value = "关联数超限-分页列表查询", notes = "关联数超限-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<AiCreativeLimit>> queryPageList(AiCreativeLimit aiCreativeLimit,
+                                                        @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                        @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                        HttpServletRequest req) {
+        Result<IPage<AiCreativeLimit>> result = new Result<>();
+        QueryWrapper<AiCreativeLimit> queryWrapper = QueryGenerator.initQueryWrapper(aiCreativeLimit, req.getParameterMap());
+        Page<AiCreativeLimit> page = new Page<AiCreativeLimit>(pageNo, pageSize);
+        IPage<AiCreativeLimit> pageList = aiCreativeLimitService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param aiCreativeLimit
+     * @return
+     */
+    @AutoLog(value = "关联数超限-添加")
+    @ApiOperation(value = "关联数超限-添加", notes = "关联数超限-添加")
+    @PostMapping(value = "/add")
+    public Result<AiCreativeLimit> add(@RequestBody AiCreativeLimit aiCreativeLimit) {
+        Result<AiCreativeLimit> result = new Result<>();
+        try {
+            aiCreativeLimitService.save(aiCreativeLimit);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param aiCreativeLimit
+     * @return
+     */
+    @AutoLog(value = "关联数超限-编辑")
+    @ApiOperation(value = "关联数超限-编辑", notes = "关联数超限-编辑")
+    @PutMapping(value = "/edit")
+    public Result<AiCreativeLimit> edit(@RequestBody AiCreativeLimit aiCreativeLimit) {
+        Result<AiCreativeLimit> result = new Result<AiCreativeLimit>();
+        AiCreativeLimit aiCreativeLimitEntity = aiCreativeLimitService.getById(aiCreativeLimit.getId());
+        if (aiCreativeLimitEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = aiCreativeLimitService.updateById(aiCreativeLimit);
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "关联数超限-通过id删除")
+    @ApiOperation(value = "关联数超限-通过id删除", notes = "关联数超限-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            aiCreativeLimitService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "关联数超限-批量删除")
+    @ApiOperation(value = "关联数超限-批量删除", notes = "关联数超限-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<AiCreativeLimit> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<AiCreativeLimit> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.aiCreativeLimitService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "关联数超限-通过id查询")
+    @ApiOperation(value = "关联数超限-通过id查询", notes = "关联数超限-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<AiCreativeLimit> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<AiCreativeLimit> result = new Result<>();
+        AiCreativeLimit aiCreativeLimit = aiCreativeLimitService.getById(id);
+        if (aiCreativeLimit == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(aiCreativeLimit);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<AiCreativeLimit> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                AiCreativeLimit aiCreativeLimit = JSON.parseObject(deString, AiCreativeLimit.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(aiCreativeLimit, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<AiCreativeLimit> pageList = aiCreativeLimitService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "关联数超限列表");
+        mv.addObject(NormalExcelConstants.CLASS, AiCreativeLimit.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("关联数超限列表数据", "导出人:Jeecg", "导出信息"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            MultipartFile file = entity.getValue();
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<AiCreativeLimit> listAiCreativeLimits = ExcelImportUtil.importExcel(file.getInputStream(), AiCreativeLimit.class, params);
+                aiCreativeLimitService.saveBatch(listAiCreativeLimits);
+                return Result.ok("文件导入成功!数据行数:" + listAiCreativeLimits.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.ok("文件导入失败!");
+    }
+
+}

+ 65 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/entity/AiCreativeLimit.java

@@ -0,0 +1,65 @@
+package cn.com.ctop.kuaishou.modules.ai.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * 关联数超限
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2021-03-24
+ */
+@Data
+@TableName("ctop_ai_creative_limit")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_ai_creative_limit对象", description = "关联数超限")
+public class AiCreativeLimit {
+
+    /**
+     * 主键ID
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "主键ID")
+    private Long id;
+    /**
+     * 账户id
+     */
+    @Excel(name = "账户id", width = 15)
+    @ApiModelProperty(value = "账户id")
+    private Long accountId;
+    /**
+     * 账户id
+     */
+    @Excel(name = "账户id", width = 15)
+    @ApiModelProperty(value = "账户id")
+    private Long photoId;
+    /**
+     * 创建时间
+     */
+    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 修改时间
+     */
+    @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+}

+ 17 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/AiCreativeLimitMapper.java

@@ -0,0 +1,17 @@
+package cn.com.ctop.kuaishou.modules.ai.mapper;
+
+import cn.com.ctop.kuaishou.modules.ai.entity.AiCreativeLimit;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 关联数超限
+ *
+ * @author: jeecg-boot
+ * @date: 2021-03-24
+ * @cersion: V1.0
+ */
+public interface AiCreativeLimitMapper extends BaseMapper<AiCreativeLimit> {
+
+    void replaceSava(@Param("accountId") Long advertiserId, @Param("photoId") Long photo_id);
+}

+ 15 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/xml/AiCreativeLimitMapper.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.com.ctop.kuaishou.modules.ai.mapper.AiCreativeLimitMapper">
+
+    <insert id="replaceSava">
+        replace into ctop_ai_creative_limit
+        (account_id,
+        photo_id)
+        values (
+        #{accountId},
+        #{photoId}
+        )
+
+    </insert>
+</mapper>

+ 15 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/IAiCreativeLimitService.java

@@ -0,0 +1,15 @@
+package cn.com.ctop.kuaishou.modules.ai.service;
+
+import cn.com.ctop.kuaishou.modules.ai.entity.AiCreativeLimit;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 关联数超限
+ * @Author: jeecg-boot
+ * @Date: 2021-03-24
+ * @Version: V1.0
+ */
+public interface IAiCreativeLimitService extends IService<AiCreativeLimit> {
+
+    void replaceSava(Long advertiserId, Long photo_id);
+}

+ 26 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiCreativeLimitServiceImpl.java

@@ -0,0 +1,26 @@
+package cn.com.ctop.kuaishou.modules.ai.service.impl;
+
+import cn.com.ctop.kuaishou.modules.ai.entity.AiCreativeLimit;
+import cn.com.ctop.kuaishou.modules.ai.mapper.AiCreativeLimitMapper;
+import cn.com.ctop.kuaishou.modules.ai.service.IAiCreativeLimitService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 关联数超限
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2021-03-24
+ */
+@Service
+public class AiCreativeLimitServiceImpl extends ServiceImpl<AiCreativeLimitMapper, AiCreativeLimit> implements IAiCreativeLimitService {
+    @Autowired
+    private AiCreativeLimitMapper creativeLimitMapper;
+
+    @Override
+    public void replaceSava(Long advertiserId, Long photo_id) {
+        creativeLimitMapper.replaceSava(advertiserId,photo_id);
+    }
+}

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

@@ -89,6 +89,7 @@
     </select>
 
     <select id="getHistoryTopVideoList" resultType="com.alibaba.fastjson.JSONObject">
+        select t3.* from (
         select
         t2.photo_id,
         t1.charge
@@ -134,5 +135,8 @@
         account_id = #{accountId}
         ) t2 ON t1.signature = t2.signature
         ORDER BY t1.charge DESC
+        ) t3 left join
+        ( SELECT id,photo_id from ctop_ai_creative_limit WHERE account_id = #{accountId} ) t4 on t3.photo_id = t4.photo_id
+        where t4.id is null
     </select>
 </mapper>

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

@@ -8,6 +8,7 @@ import cn.com.ctop.common.module.service.IMaterialCutFrameService;
 import cn.com.ctop.common.module.service.IOauthConfigService;
 import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.*;
+import cn.com.ctop.kuaishou.modules.ai.service.IAiCreativeLimitService;
 import cn.com.ctop.kuaishou.modules.ai.service.IKuaishouAccountCreativeOverrunInfoService;
 import cn.com.ctop.kuaishou.modules.batch.entity.*;
 import cn.com.ctop.kuaishou.modules.batch.entity.vo.ConvertVo;
@@ -1947,6 +1948,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
 
     @Autowired
     private IKuaiShouOverRunSendMessageService overRunSendMessageService;
+    @Autowired
+    private IAiCreativeLimitService creativeLimitService;
 
     @Override
     public Map<String, Object> creativeCreate(String accessToken, Long advertiserId, JSONObject requestJson, Integer count) {
@@ -1995,6 +1998,11 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                         creativeOverrunInfoService.updateOverrunInfo(advertiserId);
                         overRunSendMessageService.creativeOverRunSendMessage(advertiserId, null);
                     }
+
+                    if (code == 401000 && resultJson.getString("message").contains("超过可关联的有效创意的上限")) {
+                        creativeLimitService.replaceSava(advertiserId, requestJson.getLong("photo_id"));
+                    }
+
                     log.error("创建广告创意失败,advertiser_id:{},返回信息:{},入参:{}", advertiserId, resultJson, requestJson, count + 1);
                     returnMap.put("code", -1);
                     returnMap.put("message", resultJson.getString("message"));

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

@@ -2,6 +2,9 @@ package cn.com.ctop.kuaishou.modules.report.mapper;
 
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouAudienceReportDailyAge;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * 人群分析报表
@@ -12,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface KuaishouAudienceReportDailyAgeMapper extends BaseMapper<KuaishouAudienceReportDailyAge> {
 
+    void replaceBatch(@Param(value = "data") List<KuaishouAudienceReportDailyAge> data);
 }

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

@@ -2,6 +2,9 @@ package cn.com.ctop.kuaishou.modules.report.mapper;
 
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouAudienceReportDailyBusiness;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * 人群分析报表
@@ -12,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface KuaishouAudienceReportDailyBusinessMapper extends BaseMapper<KuaishouAudienceReportDailyBusiness> {
 
+    void replaceBatch(@Param(value = "data") List<KuaishouAudienceReportDailyBusiness> data);
 }

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

@@ -2,6 +2,9 @@ package cn.com.ctop.kuaishou.modules.report.mapper;
 
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouAudienceReportDailyCity;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * 人群分析报表
@@ -12,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface KuaishouAudienceReportDailyCityMapper extends BaseMapper<KuaishouAudienceReportDailyCity> {
 
+    void replaceBatch(@Param(value = "data") List<KuaishouAudienceReportDailyCity> data);
 }

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

@@ -2,6 +2,9 @@ package cn.com.ctop.kuaishou.modules.report.mapper;
 
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouAudienceReportDailyClient;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * 人群分析报表
@@ -12,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface KuaishouAudienceReportDailyClientMapper extends BaseMapper<KuaishouAudienceReportDailyClient> {
 
+    void replaceBatch(@Param(value = "data") List<KuaishouAudienceReportDailyClient> data);
 }

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

@@ -2,6 +2,9 @@ package cn.com.ctop.kuaishou.modules.report.mapper;
 
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouAudienceReportDailyGender;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * 人群分析报表
@@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @cersion: V1.0
  */
 public interface KuaishouAudienceReportDailyGenderMapper extends BaseMapper<KuaishouAudienceReportDailyGender> {
+    void replaceBatch(@Param(value = "data") List<KuaishouAudienceReportDailyGender> data);
 }

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

@@ -2,6 +2,9 @@ package cn.com.ctop.kuaishou.modules.report.mapper;
 
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouAudienceReportDailyProvince;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * 人群分析报表
@@ -12,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface KuaishouAudienceReportDailyProvinceMapper extends BaseMapper<KuaishouAudienceReportDailyProvince> {
 
+    void replaceBatch(@Param(value = "data") List<KuaishouAudienceReportDailyProvince> data);
 }

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

@@ -2,4 +2,250 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaishouAudienceReportDailyAgeMapper">
 
+    <insert id="replaceBatch">
+        replace into ctop_kuaishou_audience_report_daily_age (
+        account_id,
+        plan_id ,
+        unit_id ,
+        placement_type,
+        stat_date ,
+        aclick ,
+        bclick ,
+        photo_click_cost,
+        follow ,
+        cancel_follow ,
+        report ,
+        block ,
+        negative ,
+        download_started ,
+        download_completed ,
+        activation ,
+        submit ,
+        photo_click ,
+        photo_click_ratio,
+        charge ,
+        action_ratio ,
+        impression_1k_cost,
+        action_cost ,
+        event_pay_first_day ,
+        event_pay_purchase_amount_first_day,
+        event_pay_first_day_roi,
+        event_pay ,
+        event_pay_purchase_amount ,
+        event_pay_roi ,
+        event_register ,
+        event_register_cost ,
+        event_register_ratio ,
+        event_jin_jian_app ,
+        event_jin_jian_app_cost ,
+        event_credit_grant_app ,
+        event_credit_grant_app_cost,
+        event_order_paid ,
+        event_order_paid_purchase_amount,
+        event_jin_jian_landing_page ,
+        event_jin_jian_landing_page_cost ,
+        event_credit_grant_landing_page ,
+        event_credit_grant_landing_page_cost,
+        event_credit_grant_landing_ratio ,
+        event_next_day_stay_cost ,
+        event_next_day_stay_ratio ,
+        form_action_ratio ,
+        event_order_paid_cost ,
+        event_next_day_stay ,
+        form_cost ,
+        form_count ,
+        play_3s_ratio ,
+        stat_hour ,
+        click_1k_cost ,
+        event_valid_clues ,
+        event_valid_clues_cost,
+        ad_product_cnt ,
+        event_goods_view ,
+        merchant_reco_fans ,
+        event_order_amount_roi ,
+        event_new_user_pay ,
+        event_new_user_pay_cost ,
+        event_new_user_pay_ratio ,
+        event_button_click ,
+        event_button_click_cost ,
+        event_button_click_ratio ,
+        play_5s_ratio ,
+        play_end_ratio ,
+        event_order_paid_roi,
+        event_new_user_jinjian_app ,
+        event_new_user_jinjian_app_cost,
+        event_new_user_jinjian_app_roi ,
+        event_new_user_credit_grant_app ,
+        event_new_user_credit_grant_app_cost,
+        event_new_user_credit_grant_app_roi ,
+        event_new_user_jinjian_page ,
+        event_new_user_jinjian_page_cost ,
+        event_new_user_jinjian_page_roi ,
+        event_new_user_credit_grant_page ,
+        event_new_user_credit_grant_page_cost ,
+        event_new_user_credit_grant_page_roi ,
+        event_appoint_form ,
+        event_appoint_form_cost,
+        event_appoint_form_ratio,
+        event_appoint_jump_click ,
+        event_appoint_jump_click_cost,
+        event_appoint_jump_click_ratio,
+        union_event_pay_purchase_amount_7d ,
+        province ,
+        event_app_invoked ,
+        union_event_pay_purchase_amount_7d_roi,
+        event_add_shopping_cart_cost ,
+        gender ,
+        city ,
+        event_ad_watch_times_ratio ,
+        shares ,
+        business_interest_tags ,
+        event_watch_app_ad ,
+        event_multi_conversion_cost,
+        merchant_reco_fans_cost ,
+        ad_scene ,
+        event_ad_watch_times_cost ,
+        event_add_shopping_cart ,
+        age_segment ,
+        photo_like ,
+        event_add_wechat ,
+        event_add_wechat_cost,
+        event_add_wechat_ratio,
+        event_app_invoked_cost ,
+        event_multi_conversion ,
+        event_dsp_gift_form ,
+        event_app_invoked_ratio ,
+        photo_show ,
+        event_multi_conversion_ratio,
+        client ,
+        event_goods_view_cost ,
+        event_credit_grant_app_ratio,
+        event_ad_watch_times ,
+        comments
+        )
+        values
+        <foreach collection="data" item="da" separator=",">
+            (
+            #{da.accountId},
+            #{da.planId},
+            #{da.unitId},
+            #{da.placementType},
+            #{da.statDate},
+            #{da.aclick},
+            #{da.bclick},
+            #{da.photoClickCost},
+            #{da.follow},
+            #{da.cancelFollow},
+            #{da.report},
+            #{da.block},
+            #{da.negative},
+            #{da.downloadStarted},
+            #{da.downloadCompleted},
+            #{da.activation},
+            #{da.submit},
+            #{da.photoClick},
+            #{da.photoClickRatio},
+            #{da.charge},
+            #{da.actionRatio},
+            #{da.impression_1kCost},
+            #{da.actionCost},
+            #{da.eventPayFirstDay},
+            #{da.eventPayPurchaseAmountFirstDay},
+            #{da.eventPayFirstDayRoi},
+            #{da.eventPay},
+            #{da.eventPayPurchaseAmount},
+            #{da.eventPayRoi},
+            #{da.eventRegister},
+            #{da.eventRegisterCost},
+            #{da.eventRegisterRatio},
+            #{da.eventJinJianApp},
+            #{da.eventJinJianAppCost},
+            #{da.eventCreditGrantApp},
+            #{da.eventCreditGrantAppCost},
+            #{da.eventOrderPaid},
+            #{da.eventOrderPaidPurchaseAmount},
+            #{da.eventJinJianLandingPage},
+            #{da.eventJinJianLandingPageCost},
+            #{da.eventCreditGrantLandingPage},
+            #{da.eventCreditGrantLandingPageCost},
+            #{da.eventCreditGrantLandingRatio},
+            #{da.eventNextDayStayCost},
+            #{da.eventNextDayStayRatio},
+            #{da.formActionRatio},
+            #{da.eventOrderPaidCost},
+            #{da.eventNextDayStay},
+            #{da.formCost},
+            #{da.formCount},
+            #{da.play_3sRatio},
+            #{da.statHour},
+            #{da.click_1kCost},
+            #{da.eventValidClues},
+            #{da.eventValidCluesCost},
+            #{da.adProductCnt},
+            #{da.eventGoodsView},
+            #{da.merchantRecoFans},
+            #{da.eventOrderAmountRoi},
+            #{da.eventNewUserPay},
+            #{da.eventNewUserPayCost},
+            #{da.eventNewUserPayRatio},
+            #{da.eventButtonClick},
+            #{da.eventButtonClickCost},
+            #{da.eventButtonClickRatio},
+            #{da.play_5sRatio},
+            #{da.playEndRatio},
+            #{da.eventOrderPaidRoi},
+            #{da.eventNewUserJinjianApp},
+            #{da.eventNewUserJinjianAppCost},
+            #{da.eventNewUserJinjianAppRoi},
+            #{da.eventNewUserCreditGrantApp},
+            #{da.eventNewUserCreditGrantAppCost},
+            #{da.eventNewUserCreditGrantAppRoi},
+            #{da.eventNewUserJinjianPage},
+            #{da.eventNewUserJinjianPageCost},
+            #{da.eventNewUserJinjianPageRoi},
+            #{da.eventNewUserCreditGrantPage},
+            #{da.eventNewUserCreditGrantPageCost},
+            #{da.eventNewUserCreditGrantPageRoi},
+            #{da.eventAppointForm},
+            #{da.eventAppointFormCost},
+            #{da.eventAppointFormRatio},
+            #{da.eventAppointJumpClick},
+            #{da.eventAppointJumpClickCost},
+            #{da.eventAppointJumpClickRatio},
+            #{da.unionEventPayPurchaseAmount_7d},
+            #{da.province},
+            #{da.eventAppInvoked},
+            #{da.unionEventPayPurchaseAmount_7dRoi},
+            #{da.eventAddShoppingCartCost},
+            #{da.gender},
+            #{da.city},
+            #{da.eventAdWatchTimesRatio},
+            #{da.shares},
+            #{da.businessInterestTags},
+            #{da.eventWatchAppAd},
+            #{da.eventMultiConversionCost},
+            #{da.merchantRecoFansCost},
+            #{da.adScene},
+            #{da.eventAdWatchTimesCost},
+            #{da.eventAddShoppingCart},
+            #{da.ageSegment},
+            #{da.photoLike},
+            #{da.eventAddWechat},
+            #{da.eventAddWechatCost},
+            #{da.eventAddWechatRatio},
+            #{da.eventAppInvokedCost},
+            #{da.eventMultiConversion},
+            #{da.eventDspGiftForm},
+            #{da.eventAppInvokedRatio},
+            #{da.photoShow},
+            #{da.eventMultiConversionRatio},
+            #{da.client},
+            #{da.eventGoodsViewCost},
+            #{da.eventCreditGrantAppRatio},
+            #{da.eventAdWatchTimes},
+            #{da.comments}
+            )
+        </foreach>
+    </insert>
+
 </mapper>

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

@@ -2,4 +2,250 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaishouAudienceReportDailyBusinessMapper">
 
+    <insert id="replaceBatch">
+        replace into ctop_kuaishou_audience_report_daily_business (
+        account_id,
+        plan_id ,
+        unit_id ,
+        placement_type,
+        stat_date ,
+        aclick ,
+        bclick ,
+        photo_click_cost,
+        follow ,
+        cancel_follow ,
+        report ,
+        block ,
+        negative ,
+        download_started ,
+        download_completed ,
+        activation ,
+        submit ,
+        photo_click ,
+        photo_click_ratio,
+        charge ,
+        action_ratio ,
+        impression_1k_cost,
+        action_cost ,
+        event_pay_first_day ,
+        event_pay_purchase_amount_first_day,
+        event_pay_first_day_roi,
+        event_pay ,
+        event_pay_purchase_amount ,
+        event_pay_roi ,
+        event_register ,
+        event_register_cost ,
+        event_register_ratio ,
+        event_jin_jian_app ,
+        event_jin_jian_app_cost ,
+        event_credit_grant_app ,
+        event_credit_grant_app_cost,
+        event_order_paid ,
+        event_order_paid_purchase_amount,
+        event_jin_jian_landing_page ,
+        event_jin_jian_landing_page_cost ,
+        event_credit_grant_landing_page ,
+        event_credit_grant_landing_page_cost,
+        event_credit_grant_landing_ratio ,
+        event_next_day_stay_cost ,
+        event_next_day_stay_ratio ,
+        form_action_ratio ,
+        event_order_paid_cost ,
+        event_next_day_stay ,
+        form_cost ,
+        form_count ,
+        play_3s_ratio ,
+        stat_hour ,
+        click_1k_cost ,
+        event_valid_clues ,
+        event_valid_clues_cost,
+        ad_product_cnt ,
+        event_goods_view ,
+        merchant_reco_fans ,
+        event_order_amount_roi ,
+        event_new_user_pay ,
+        event_new_user_pay_cost ,
+        event_new_user_pay_ratio ,
+        event_button_click ,
+        event_button_click_cost ,
+        event_button_click_ratio ,
+        play_5s_ratio ,
+        play_end_ratio ,
+        event_order_paid_roi,
+        event_new_user_jinjian_app ,
+        event_new_user_jinjian_app_cost,
+        event_new_user_jinjian_app_roi ,
+        event_new_user_credit_grant_app ,
+        event_new_user_credit_grant_app_cost,
+        event_new_user_credit_grant_app_roi ,
+        event_new_user_jinjian_page ,
+        event_new_user_jinjian_page_cost ,
+        event_new_user_jinjian_page_roi ,
+        event_new_user_credit_grant_page ,
+        event_new_user_credit_grant_page_cost ,
+        event_new_user_credit_grant_page_roi ,
+        event_appoint_form ,
+        event_appoint_form_cost,
+        event_appoint_form_ratio,
+        event_appoint_jump_click ,
+        event_appoint_jump_click_cost,
+        event_appoint_jump_click_ratio,
+        union_event_pay_purchase_amount_7d ,
+        province ,
+        event_app_invoked ,
+        union_event_pay_purchase_amount_7d_roi,
+        event_add_shopping_cart_cost ,
+        gender ,
+        city ,
+        event_ad_watch_times_ratio ,
+        shares ,
+        business_interest_tags ,
+        event_watch_app_ad ,
+        event_multi_conversion_cost,
+        merchant_reco_fans_cost ,
+        ad_scene ,
+        event_ad_watch_times_cost ,
+        event_add_shopping_cart ,
+        age_segment ,
+        photo_like ,
+        event_add_wechat ,
+        event_add_wechat_cost,
+        event_add_wechat_ratio,
+        event_app_invoked_cost ,
+        event_multi_conversion ,
+        event_dsp_gift_form ,
+        event_app_invoked_ratio ,
+        photo_show ,
+        event_multi_conversion_ratio,
+        client ,
+        event_goods_view_cost ,
+        event_credit_grant_app_ratio,
+        event_ad_watch_times ,
+        comments
+        )
+        values
+        <foreach collection="data" item="da" separator=",">
+            (
+            #{da.accountId},
+            #{da.planId},
+            #{da.unitId},
+            #{da.placementType},
+            #{da.statDate},
+            #{da.aclick},
+            #{da.bclick},
+            #{da.photoClickCost},
+            #{da.follow},
+            #{da.cancelFollow},
+            #{da.report},
+            #{da.block},
+            #{da.negative},
+            #{da.downloadStarted},
+            #{da.downloadCompleted},
+            #{da.activation},
+            #{da.submit},
+            #{da.photoClick},
+            #{da.photoClickRatio},
+            #{da.charge},
+            #{da.actionRatio},
+            #{da.impression_1kCost},
+            #{da.actionCost},
+            #{da.eventPayFirstDay},
+            #{da.eventPayPurchaseAmountFirstDay},
+            #{da.eventPayFirstDayRoi},
+            #{da.eventPay},
+            #{da.eventPayPurchaseAmount},
+            #{da.eventPayRoi},
+            #{da.eventRegister},
+            #{da.eventRegisterCost},
+            #{da.eventRegisterRatio},
+            #{da.eventJinJianApp},
+            #{da.eventJinJianAppCost},
+            #{da.eventCreditGrantApp},
+            #{da.eventCreditGrantAppCost},
+            #{da.eventOrderPaid},
+            #{da.eventOrderPaidPurchaseAmount},
+            #{da.eventJinJianLandingPage},
+            #{da.eventJinJianLandingPageCost},
+            #{da.eventCreditGrantLandingPage},
+            #{da.eventCreditGrantLandingPageCost},
+            #{da.eventCreditGrantLandingRatio},
+            #{da.eventNextDayStayCost},
+            #{da.eventNextDayStayRatio},
+            #{da.formActionRatio},
+            #{da.eventOrderPaidCost},
+            #{da.eventNextDayStay},
+            #{da.formCost},
+            #{da.formCount},
+            #{da.play_3sRatio},
+            #{da.statHour},
+            #{da.click_1kCost},
+            #{da.eventValidClues},
+            #{da.eventValidCluesCost},
+            #{da.adProductCnt},
+            #{da.eventGoodsView},
+            #{da.merchantRecoFans},
+            #{da.eventOrderAmountRoi},
+            #{da.eventNewUserPay},
+            #{da.eventNewUserPayCost},
+            #{da.eventNewUserPayRatio},
+            #{da.eventButtonClick},
+            #{da.eventButtonClickCost},
+            #{da.eventButtonClickRatio},
+            #{da.play_5sRatio},
+            #{da.playEndRatio},
+            #{da.eventOrderPaidRoi},
+            #{da.eventNewUserJinjianApp},
+            #{da.eventNewUserJinjianAppCost},
+            #{da.eventNewUserJinjianAppRoi},
+            #{da.eventNewUserCreditGrantApp},
+            #{da.eventNewUserCreditGrantAppCost},
+            #{da.eventNewUserCreditGrantAppRoi},
+            #{da.eventNewUserJinjianPage},
+            #{da.eventNewUserJinjianPageCost},
+            #{da.eventNewUserJinjianPageRoi},
+            #{da.eventNewUserCreditGrantPage},
+            #{da.eventNewUserCreditGrantPageCost},
+            #{da.eventNewUserCreditGrantPageRoi},
+            #{da.eventAppointForm},
+            #{da.eventAppointFormCost},
+            #{da.eventAppointFormRatio},
+            #{da.eventAppointJumpClick},
+            #{da.eventAppointJumpClickCost},
+            #{da.eventAppointJumpClickRatio},
+            #{da.unionEventPayPurchaseAmount_7d},
+            #{da.province},
+            #{da.eventAppInvoked},
+            #{da.unionEventPayPurchaseAmount_7dRoi},
+            #{da.eventAddShoppingCartCost},
+            #{da.gender},
+            #{da.city},
+            #{da.eventAdWatchTimesRatio},
+            #{da.shares},
+            #{da.businessInterestTags},
+            #{da.eventWatchAppAd},
+            #{da.eventMultiConversionCost},
+            #{da.merchantRecoFansCost},
+            #{da.adScene},
+            #{da.eventAdWatchTimesCost},
+            #{da.eventAddShoppingCart},
+            #{da.ageSegment},
+            #{da.photoLike},
+            #{da.eventAddWechat},
+            #{da.eventAddWechatCost},
+            #{da.eventAddWechatRatio},
+            #{da.eventAppInvokedCost},
+            #{da.eventMultiConversion},
+            #{da.eventDspGiftForm},
+            #{da.eventAppInvokedRatio},
+            #{da.photoShow},
+            #{da.eventMultiConversionRatio},
+            #{da.client},
+            #{da.eventGoodsViewCost},
+            #{da.eventCreditGrantAppRatio},
+            #{da.eventAdWatchTimes},
+            #{da.comments}
+            )
+        </foreach>
+    </insert>
+
 </mapper>

+ 245 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouAudienceReportDailyCityMapper.xml

@@ -2,6 +2,250 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaishouAudienceReportDailyCityMapper">
 
-
+    <insert id="replaceBatch">
+        replace into ctop_kuaishou_audience_report_daily_city (
+        account_id,
+        plan_id ,
+        unit_id ,
+        placement_type,
+        stat_date ,
+        aclick ,
+        bclick ,
+        photo_click_cost,
+        follow ,
+        cancel_follow ,
+        report ,
+        block ,
+        negative ,
+        download_started ,
+        download_completed ,
+        activation ,
+        submit ,
+        photo_click ,
+        photo_click_ratio,
+        charge ,
+        action_ratio ,
+        impression_1k_cost,
+        action_cost ,
+        event_pay_first_day ,
+        event_pay_purchase_amount_first_day,
+        event_pay_first_day_roi,
+        event_pay ,
+        event_pay_purchase_amount ,
+        event_pay_roi ,
+        event_register ,
+        event_register_cost ,
+        event_register_ratio ,
+        event_jin_jian_app ,
+        event_jin_jian_app_cost ,
+        event_credit_grant_app ,
+        event_credit_grant_app_cost,
+        event_order_paid ,
+        event_order_paid_purchase_amount,
+        event_jin_jian_landing_page ,
+        event_jin_jian_landing_page_cost ,
+        event_credit_grant_landing_page ,
+        event_credit_grant_landing_page_cost,
+        event_credit_grant_landing_ratio ,
+        event_next_day_stay_cost ,
+        event_next_day_stay_ratio ,
+        form_action_ratio ,
+        event_order_paid_cost ,
+        event_next_day_stay ,
+        form_cost ,
+        form_count ,
+        play_3s_ratio ,
+        stat_hour ,
+        click_1k_cost ,
+        event_valid_clues ,
+        event_valid_clues_cost,
+        ad_product_cnt ,
+        event_goods_view ,
+        merchant_reco_fans ,
+        event_order_amount_roi ,
+        event_new_user_pay ,
+        event_new_user_pay_cost ,
+        event_new_user_pay_ratio ,
+        event_button_click ,
+        event_button_click_cost ,
+        event_button_click_ratio ,
+        play_5s_ratio ,
+        play_end_ratio ,
+        event_order_paid_roi,
+        event_new_user_jinjian_app ,
+        event_new_user_jinjian_app_cost,
+        event_new_user_jinjian_app_roi ,
+        event_new_user_credit_grant_app ,
+        event_new_user_credit_grant_app_cost,
+        event_new_user_credit_grant_app_roi ,
+        event_new_user_jinjian_page ,
+        event_new_user_jinjian_page_cost ,
+        event_new_user_jinjian_page_roi ,
+        event_new_user_credit_grant_page ,
+        event_new_user_credit_grant_page_cost ,
+        event_new_user_credit_grant_page_roi ,
+        event_appoint_form ,
+        event_appoint_form_cost,
+        event_appoint_form_ratio,
+        event_appoint_jump_click ,
+        event_appoint_jump_click_cost,
+        event_appoint_jump_click_ratio,
+        union_event_pay_purchase_amount_7d ,
+        province ,
+        event_app_invoked ,
+        union_event_pay_purchase_amount_7d_roi,
+        event_add_shopping_cart_cost ,
+        gender ,
+        city ,
+        event_ad_watch_times_ratio ,
+        shares ,
+        business_interest_tags ,
+        event_watch_app_ad ,
+        event_multi_conversion_cost,
+        merchant_reco_fans_cost ,
+        ad_scene ,
+        event_ad_watch_times_cost ,
+        event_add_shopping_cart ,
+        age_segment ,
+        photo_like ,
+        event_add_wechat ,
+        event_add_wechat_cost,
+        event_add_wechat_ratio,
+        event_app_invoked_cost ,
+        event_multi_conversion ,
+        event_dsp_gift_form ,
+        event_app_invoked_ratio ,
+        photo_show ,
+        event_multi_conversion_ratio,
+        client ,
+        event_goods_view_cost ,
+        event_credit_grant_app_ratio,
+        event_ad_watch_times ,
+        comments
+        )
+        values
+        <foreach collection="data" item="da" separator=",">
+            (
+            #{da.accountId},
+            #{da.planId},
+            #{da.unitId},
+            #{da.placementType},
+            #{da.statDate},
+            #{da.aclick},
+            #{da.bclick},
+            #{da.photoClickCost},
+            #{da.follow},
+            #{da.cancelFollow},
+            #{da.report},
+            #{da.block},
+            #{da.negative},
+            #{da.downloadStarted},
+            #{da.downloadCompleted},
+            #{da.activation},
+            #{da.submit},
+            #{da.photoClick},
+            #{da.photoClickRatio},
+            #{da.charge},
+            #{da.actionRatio},
+            #{da.impression_1kCost},
+            #{da.actionCost},
+            #{da.eventPayFirstDay},
+            #{da.eventPayPurchaseAmountFirstDay},
+            #{da.eventPayFirstDayRoi},
+            #{da.eventPay},
+            #{da.eventPayPurchaseAmount},
+            #{da.eventPayRoi},
+            #{da.eventRegister},
+            #{da.eventRegisterCost},
+            #{da.eventRegisterRatio},
+            #{da.eventJinJianApp},
+            #{da.eventJinJianAppCost},
+            #{da.eventCreditGrantApp},
+            #{da.eventCreditGrantAppCost},
+            #{da.eventOrderPaid},
+            #{da.eventOrderPaidPurchaseAmount},
+            #{da.eventJinJianLandingPage},
+            #{da.eventJinJianLandingPageCost},
+            #{da.eventCreditGrantLandingPage},
+            #{da.eventCreditGrantLandingPageCost},
+            #{da.eventCreditGrantLandingRatio},
+            #{da.eventNextDayStayCost},
+            #{da.eventNextDayStayRatio},
+            #{da.formActionRatio},
+            #{da.eventOrderPaidCost},
+            #{da.eventNextDayStay},
+            #{da.formCost},
+            #{da.formCount},
+            #{da.play_3sRatio},
+            #{da.statHour},
+            #{da.click_1kCost},
+            #{da.eventValidClues},
+            #{da.eventValidCluesCost},
+            #{da.adProductCnt},
+            #{da.eventGoodsView},
+            #{da.merchantRecoFans},
+            #{da.eventOrderAmountRoi},
+            #{da.eventNewUserPay},
+            #{da.eventNewUserPayCost},
+            #{da.eventNewUserPayRatio},
+            #{da.eventButtonClick},
+            #{da.eventButtonClickCost},
+            #{da.eventButtonClickRatio},
+            #{da.play_5sRatio},
+            #{da.playEndRatio},
+            #{da.eventOrderPaidRoi},
+            #{da.eventNewUserJinjianApp},
+            #{da.eventNewUserJinjianAppCost},
+            #{da.eventNewUserJinjianAppRoi},
+            #{da.eventNewUserCreditGrantApp},
+            #{da.eventNewUserCreditGrantAppCost},
+            #{da.eventNewUserCreditGrantAppRoi},
+            #{da.eventNewUserJinjianPage},
+            #{da.eventNewUserJinjianPageCost},
+            #{da.eventNewUserJinjianPageRoi},
+            #{da.eventNewUserCreditGrantPage},
+            #{da.eventNewUserCreditGrantPageCost},
+            #{da.eventNewUserCreditGrantPageRoi},
+            #{da.eventAppointForm},
+            #{da.eventAppointFormCost},
+            #{da.eventAppointFormRatio},
+            #{da.eventAppointJumpClick},
+            #{da.eventAppointJumpClickCost},
+            #{da.eventAppointJumpClickRatio},
+            #{da.unionEventPayPurchaseAmount_7d},
+            #{da.province},
+            #{da.eventAppInvoked},
+            #{da.unionEventPayPurchaseAmount_7dRoi},
+            #{da.eventAddShoppingCartCost},
+            #{da.gender},
+            #{da.city},
+            #{da.eventAdWatchTimesRatio},
+            #{da.shares},
+            #{da.businessInterestTags},
+            #{da.eventWatchAppAd},
+            #{da.eventMultiConversionCost},
+            #{da.merchantRecoFansCost},
+            #{da.adScene},
+            #{da.eventAdWatchTimesCost},
+            #{da.eventAddShoppingCart},
+            #{da.ageSegment},
+            #{da.photoLike},
+            #{da.eventAddWechat},
+            #{da.eventAddWechatCost},
+            #{da.eventAddWechatRatio},
+            #{da.eventAppInvokedCost},
+            #{da.eventMultiConversion},
+            #{da.eventDspGiftForm},
+            #{da.eventAppInvokedRatio},
+            #{da.photoShow},
+            #{da.eventMultiConversionRatio},
+            #{da.client},
+            #{da.eventGoodsViewCost},
+            #{da.eventCreditGrantAppRatio},
+            #{da.eventAdWatchTimes},
+            #{da.comments}
+            )
+        </foreach>
+    </insert>
 
 </mapper>

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

@@ -2,4 +2,250 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaishouAudienceReportDailyClientMapper">
 
+    <insert id="replaceBatch">
+        replace into ctop_kuaishou_audience_report_daily_client (
+        account_id,
+        plan_id ,
+        unit_id ,
+        placement_type,
+        stat_date ,
+        aclick ,
+        bclick ,
+        photo_click_cost,
+        follow ,
+        cancel_follow ,
+        report ,
+        block ,
+        negative ,
+        download_started ,
+        download_completed ,
+        activation ,
+        submit ,
+        photo_click ,
+        photo_click_ratio,
+        charge ,
+        action_ratio ,
+        impression_1k_cost,
+        action_cost ,
+        event_pay_first_day ,
+        event_pay_purchase_amount_first_day,
+        event_pay_first_day_roi,
+        event_pay ,
+        event_pay_purchase_amount ,
+        event_pay_roi ,
+        event_register ,
+        event_register_cost ,
+        event_register_ratio ,
+        event_jin_jian_app ,
+        event_jin_jian_app_cost ,
+        event_credit_grant_app ,
+        event_credit_grant_app_cost,
+        event_order_paid ,
+        event_order_paid_purchase_amount,
+        event_jin_jian_landing_page ,
+        event_jin_jian_landing_page_cost ,
+        event_credit_grant_landing_page ,
+        event_credit_grant_landing_page_cost,
+        event_credit_grant_landing_ratio ,
+        event_next_day_stay_cost ,
+        event_next_day_stay_ratio ,
+        form_action_ratio ,
+        event_order_paid_cost ,
+        event_next_day_stay ,
+        form_cost ,
+        form_count ,
+        play_3s_ratio ,
+        stat_hour ,
+        click_1k_cost ,
+        event_valid_clues ,
+        event_valid_clues_cost,
+        ad_product_cnt ,
+        event_goods_view ,
+        merchant_reco_fans ,
+        event_order_amount_roi ,
+        event_new_user_pay ,
+        event_new_user_pay_cost ,
+        event_new_user_pay_ratio ,
+        event_button_click ,
+        event_button_click_cost ,
+        event_button_click_ratio ,
+        play_5s_ratio ,
+        play_end_ratio ,
+        event_order_paid_roi,
+        event_new_user_jinjian_app ,
+        event_new_user_jinjian_app_cost,
+        event_new_user_jinjian_app_roi ,
+        event_new_user_credit_grant_app ,
+        event_new_user_credit_grant_app_cost,
+        event_new_user_credit_grant_app_roi ,
+        event_new_user_jinjian_page ,
+        event_new_user_jinjian_page_cost ,
+        event_new_user_jinjian_page_roi ,
+        event_new_user_credit_grant_page ,
+        event_new_user_credit_grant_page_cost ,
+        event_new_user_credit_grant_page_roi ,
+        event_appoint_form ,
+        event_appoint_form_cost,
+        event_appoint_form_ratio,
+        event_appoint_jump_click ,
+        event_appoint_jump_click_cost,
+        event_appoint_jump_click_ratio,
+        union_event_pay_purchase_amount_7d ,
+        province ,
+        event_app_invoked ,
+        union_event_pay_purchase_amount_7d_roi,
+        event_add_shopping_cart_cost ,
+        gender ,
+        city ,
+        event_ad_watch_times_ratio ,
+        shares ,
+        business_interest_tags ,
+        event_watch_app_ad ,
+        event_multi_conversion_cost,
+        merchant_reco_fans_cost ,
+        ad_scene ,
+        event_ad_watch_times_cost ,
+        event_add_shopping_cart ,
+        age_segment ,
+        photo_like ,
+        event_add_wechat ,
+        event_add_wechat_cost,
+        event_add_wechat_ratio,
+        event_app_invoked_cost ,
+        event_multi_conversion ,
+        event_dsp_gift_form ,
+        event_app_invoked_ratio ,
+        photo_show ,
+        event_multi_conversion_ratio,
+        client ,
+        event_goods_view_cost ,
+        event_credit_grant_app_ratio,
+        event_ad_watch_times ,
+        comments
+        )
+        values
+        <foreach collection="data" item="da" separator=",">
+            (
+            #{da.accountId},
+            #{da.planId},
+            #{da.unitId},
+            #{da.placementType},
+            #{da.statDate},
+            #{da.aclick},
+            #{da.bclick},
+            #{da.photoClickCost},
+            #{da.follow},
+            #{da.cancelFollow},
+            #{da.report},
+            #{da.block},
+            #{da.negative},
+            #{da.downloadStarted},
+            #{da.downloadCompleted},
+            #{da.activation},
+            #{da.submit},
+            #{da.photoClick},
+            #{da.photoClickRatio},
+            #{da.charge},
+            #{da.actionRatio},
+            #{da.impression_1kCost},
+            #{da.actionCost},
+            #{da.eventPayFirstDay},
+            #{da.eventPayPurchaseAmountFirstDay},
+            #{da.eventPayFirstDayRoi},
+            #{da.eventPay},
+            #{da.eventPayPurchaseAmount},
+            #{da.eventPayRoi},
+            #{da.eventRegister},
+            #{da.eventRegisterCost},
+            #{da.eventRegisterRatio},
+            #{da.eventJinJianApp},
+            #{da.eventJinJianAppCost},
+            #{da.eventCreditGrantApp},
+            #{da.eventCreditGrantAppCost},
+            #{da.eventOrderPaid},
+            #{da.eventOrderPaidPurchaseAmount},
+            #{da.eventJinJianLandingPage},
+            #{da.eventJinJianLandingPageCost},
+            #{da.eventCreditGrantLandingPage},
+            #{da.eventCreditGrantLandingPageCost},
+            #{da.eventCreditGrantLandingRatio},
+            #{da.eventNextDayStayCost},
+            #{da.eventNextDayStayRatio},
+            #{da.formActionRatio},
+            #{da.eventOrderPaidCost},
+            #{da.eventNextDayStay},
+            #{da.formCost},
+            #{da.formCount},
+            #{da.play_3sRatio},
+            #{da.statHour},
+            #{da.click_1kCost},
+            #{da.eventValidClues},
+            #{da.eventValidCluesCost},
+            #{da.adProductCnt},
+            #{da.eventGoodsView},
+            #{da.merchantRecoFans},
+            #{da.eventOrderAmountRoi},
+            #{da.eventNewUserPay},
+            #{da.eventNewUserPayCost},
+            #{da.eventNewUserPayRatio},
+            #{da.eventButtonClick},
+            #{da.eventButtonClickCost},
+            #{da.eventButtonClickRatio},
+            #{da.play_5sRatio},
+            #{da.playEndRatio},
+            #{da.eventOrderPaidRoi},
+            #{da.eventNewUserJinjianApp},
+            #{da.eventNewUserJinjianAppCost},
+            #{da.eventNewUserJinjianAppRoi},
+            #{da.eventNewUserCreditGrantApp},
+            #{da.eventNewUserCreditGrantAppCost},
+            #{da.eventNewUserCreditGrantAppRoi},
+            #{da.eventNewUserJinjianPage},
+            #{da.eventNewUserJinjianPageCost},
+            #{da.eventNewUserJinjianPageRoi},
+            #{da.eventNewUserCreditGrantPage},
+            #{da.eventNewUserCreditGrantPageCost},
+            #{da.eventNewUserCreditGrantPageRoi},
+            #{da.eventAppointForm},
+            #{da.eventAppointFormCost},
+            #{da.eventAppointFormRatio},
+            #{da.eventAppointJumpClick},
+            #{da.eventAppointJumpClickCost},
+            #{da.eventAppointJumpClickRatio},
+            #{da.unionEventPayPurchaseAmount_7d},
+            #{da.province},
+            #{da.eventAppInvoked},
+            #{da.unionEventPayPurchaseAmount_7dRoi},
+            #{da.eventAddShoppingCartCost},
+            #{da.gender},
+            #{da.city},
+            #{da.eventAdWatchTimesRatio},
+            #{da.shares},
+            #{da.businessInterestTags},
+            #{da.eventWatchAppAd},
+            #{da.eventMultiConversionCost},
+            #{da.merchantRecoFansCost},
+            #{da.adScene},
+            #{da.eventAdWatchTimesCost},
+            #{da.eventAddShoppingCart},
+            #{da.ageSegment},
+            #{da.photoLike},
+            #{da.eventAddWechat},
+            #{da.eventAddWechatCost},
+            #{da.eventAddWechatRatio},
+            #{da.eventAppInvokedCost},
+            #{da.eventMultiConversion},
+            #{da.eventDspGiftForm},
+            #{da.eventAppInvokedRatio},
+            #{da.photoShow},
+            #{da.eventMultiConversionRatio},
+            #{da.client},
+            #{da.eventGoodsViewCost},
+            #{da.eventCreditGrantAppRatio},
+            #{da.eventAdWatchTimes},
+            #{da.comments}
+            )
+        </foreach>
+    </insert>
+
 </mapper>

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

@@ -2,4 +2,250 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaishouAudienceReportDailyGenderMapper">
 
+    <insert id="replaceBatch">
+        replace into ctop_kuaishou_audience_report_daily_gender (
+        account_id,
+        plan_id ,
+        unit_id ,
+        placement_type,
+        stat_date ,
+        aclick ,
+        bclick ,
+        photo_click_cost,
+        follow ,
+        cancel_follow ,
+        report ,
+        block ,
+        negative ,
+        download_started ,
+        download_completed ,
+        activation ,
+        submit ,
+        photo_click ,
+        photo_click_ratio,
+        charge ,
+        action_ratio ,
+        impression_1k_cost,
+        action_cost ,
+        event_pay_first_day ,
+        event_pay_purchase_amount_first_day,
+        event_pay_first_day_roi,
+        event_pay ,
+        event_pay_purchase_amount ,
+        event_pay_roi ,
+        event_register ,
+        event_register_cost ,
+        event_register_ratio ,
+        event_jin_jian_app ,
+        event_jin_jian_app_cost ,
+        event_credit_grant_app ,
+        event_credit_grant_app_cost,
+        event_order_paid ,
+        event_order_paid_purchase_amount,
+        event_jin_jian_landing_page ,
+        event_jin_jian_landing_page_cost ,
+        event_credit_grant_landing_page ,
+        event_credit_grant_landing_page_cost,
+        event_credit_grant_landing_ratio ,
+        event_next_day_stay_cost ,
+        event_next_day_stay_ratio ,
+        form_action_ratio ,
+        event_order_paid_cost ,
+        event_next_day_stay ,
+        form_cost ,
+        form_count ,
+        play_3s_ratio ,
+        stat_hour ,
+        click_1k_cost ,
+        event_valid_clues ,
+        event_valid_clues_cost,
+        ad_product_cnt ,
+        event_goods_view ,
+        merchant_reco_fans ,
+        event_order_amount_roi ,
+        event_new_user_pay ,
+        event_new_user_pay_cost ,
+        event_new_user_pay_ratio ,
+        event_button_click ,
+        event_button_click_cost ,
+        event_button_click_ratio ,
+        play_5s_ratio ,
+        play_end_ratio ,
+        event_order_paid_roi,
+        event_new_user_jinjian_app ,
+        event_new_user_jinjian_app_cost,
+        event_new_user_jinjian_app_roi ,
+        event_new_user_credit_grant_app ,
+        event_new_user_credit_grant_app_cost,
+        event_new_user_credit_grant_app_roi ,
+        event_new_user_jinjian_page ,
+        event_new_user_jinjian_page_cost ,
+        event_new_user_jinjian_page_roi ,
+        event_new_user_credit_grant_page ,
+        event_new_user_credit_grant_page_cost ,
+        event_new_user_credit_grant_page_roi ,
+        event_appoint_form ,
+        event_appoint_form_cost,
+        event_appoint_form_ratio,
+        event_appoint_jump_click ,
+        event_appoint_jump_click_cost,
+        event_appoint_jump_click_ratio,
+        union_event_pay_purchase_amount_7d ,
+        province ,
+        event_app_invoked ,
+        union_event_pay_purchase_amount_7d_roi,
+        event_add_shopping_cart_cost ,
+        gender ,
+        city ,
+        event_ad_watch_times_ratio ,
+        shares ,
+        business_interest_tags ,
+        event_watch_app_ad ,
+        event_multi_conversion_cost,
+        merchant_reco_fans_cost ,
+        ad_scene ,
+        event_ad_watch_times_cost ,
+        event_add_shopping_cart ,
+        age_segment ,
+        photo_like ,
+        event_add_wechat ,
+        event_add_wechat_cost,
+        event_add_wechat_ratio,
+        event_app_invoked_cost ,
+        event_multi_conversion ,
+        event_dsp_gift_form ,
+        event_app_invoked_ratio ,
+        photo_show ,
+        event_multi_conversion_ratio,
+        client ,
+        event_goods_view_cost ,
+        event_credit_grant_app_ratio,
+        event_ad_watch_times ,
+        comments
+        )
+        values
+        <foreach collection="data" item="da" separator=",">
+            (
+            #{da.accountId},
+            #{da.planId},
+            #{da.unitId},
+            #{da.placementType},
+            #{da.statDate},
+            #{da.aclick},
+            #{da.bclick},
+            #{da.photoClickCost},
+            #{da.follow},
+            #{da.cancelFollow},
+            #{da.report},
+            #{da.block},
+            #{da.negative},
+            #{da.downloadStarted},
+            #{da.downloadCompleted},
+            #{da.activation},
+            #{da.submit},
+            #{da.photoClick},
+            #{da.photoClickRatio},
+            #{da.charge},
+            #{da.actionRatio},
+            #{da.impression_1kCost},
+            #{da.actionCost},
+            #{da.eventPayFirstDay},
+            #{da.eventPayPurchaseAmountFirstDay},
+            #{da.eventPayFirstDayRoi},
+            #{da.eventPay},
+            #{da.eventPayPurchaseAmount},
+            #{da.eventPayRoi},
+            #{da.eventRegister},
+            #{da.eventRegisterCost},
+            #{da.eventRegisterRatio},
+            #{da.eventJinJianApp},
+            #{da.eventJinJianAppCost},
+            #{da.eventCreditGrantApp},
+            #{da.eventCreditGrantAppCost},
+            #{da.eventOrderPaid},
+            #{da.eventOrderPaidPurchaseAmount},
+            #{da.eventJinJianLandingPage},
+            #{da.eventJinJianLandingPageCost},
+            #{da.eventCreditGrantLandingPage},
+            #{da.eventCreditGrantLandingPageCost},
+            #{da.eventCreditGrantLandingRatio},
+            #{da.eventNextDayStayCost},
+            #{da.eventNextDayStayRatio},
+            #{da.formActionRatio},
+            #{da.eventOrderPaidCost},
+            #{da.eventNextDayStay},
+            #{da.formCost},
+            #{da.formCount},
+            #{da.play_3sRatio},
+            #{da.statHour},
+            #{da.click_1kCost},
+            #{da.eventValidClues},
+            #{da.eventValidCluesCost},
+            #{da.adProductCnt},
+            #{da.eventGoodsView},
+            #{da.merchantRecoFans},
+            #{da.eventOrderAmountRoi},
+            #{da.eventNewUserPay},
+            #{da.eventNewUserPayCost},
+            #{da.eventNewUserPayRatio},
+            #{da.eventButtonClick},
+            #{da.eventButtonClickCost},
+            #{da.eventButtonClickRatio},
+            #{da.play_5sRatio},
+            #{da.playEndRatio},
+            #{da.eventOrderPaidRoi},
+            #{da.eventNewUserJinjianApp},
+            #{da.eventNewUserJinjianAppCost},
+            #{da.eventNewUserJinjianAppRoi},
+            #{da.eventNewUserCreditGrantApp},
+            #{da.eventNewUserCreditGrantAppCost},
+            #{da.eventNewUserCreditGrantAppRoi},
+            #{da.eventNewUserJinjianPage},
+            #{da.eventNewUserJinjianPageCost},
+            #{da.eventNewUserJinjianPageRoi},
+            #{da.eventNewUserCreditGrantPage},
+            #{da.eventNewUserCreditGrantPageCost},
+            #{da.eventNewUserCreditGrantPageRoi},
+            #{da.eventAppointForm},
+            #{da.eventAppointFormCost},
+            #{da.eventAppointFormRatio},
+            #{da.eventAppointJumpClick},
+            #{da.eventAppointJumpClickCost},
+            #{da.eventAppointJumpClickRatio},
+            #{da.unionEventPayPurchaseAmount_7d},
+            #{da.province},
+            #{da.eventAppInvoked},
+            #{da.unionEventPayPurchaseAmount_7dRoi},
+            #{da.eventAddShoppingCartCost},
+            #{da.gender},
+            #{da.city},
+            #{da.eventAdWatchTimesRatio},
+            #{da.shares},
+            #{da.businessInterestTags},
+            #{da.eventWatchAppAd},
+            #{da.eventMultiConversionCost},
+            #{da.merchantRecoFansCost},
+            #{da.adScene},
+            #{da.eventAdWatchTimesCost},
+            #{da.eventAddShoppingCart},
+            #{da.ageSegment},
+            #{da.photoLike},
+            #{da.eventAddWechat},
+            #{da.eventAddWechatCost},
+            #{da.eventAddWechatRatio},
+            #{da.eventAppInvokedCost},
+            #{da.eventMultiConversion},
+            #{da.eventDspGiftForm},
+            #{da.eventAppInvokedRatio},
+            #{da.photoShow},
+            #{da.eventMultiConversionRatio},
+            #{da.client},
+            #{da.eventGoodsViewCost},
+            #{da.eventCreditGrantAppRatio},
+            #{da.eventAdWatchTimes},
+            #{da.comments}
+            )
+        </foreach>
+    </insert>
+
 </mapper>

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

@@ -2,5 +2,250 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaishouAudienceReportDailyProvinceMapper">
 
+    <insert id="replaceBatch">
+        replace into ctop_kuaishou_audience_report_daily_province (
+        account_id,
+        plan_id ,
+        unit_id ,
+        placement_type,
+        stat_date ,
+        aclick ,
+        bclick ,
+        photo_click_cost,
+        follow ,
+        cancel_follow ,
+        report ,
+        block ,
+        negative ,
+        download_started ,
+        download_completed ,
+        activation ,
+        submit ,
+        photo_click ,
+        photo_click_ratio,
+        charge ,
+        action_ratio ,
+        impression_1k_cost,
+        action_cost ,
+        event_pay_first_day ,
+        event_pay_purchase_amount_first_day,
+        event_pay_first_day_roi,
+        event_pay ,
+        event_pay_purchase_amount ,
+        event_pay_roi ,
+        event_register ,
+        event_register_cost ,
+        event_register_ratio ,
+        event_jin_jian_app ,
+        event_jin_jian_app_cost ,
+        event_credit_grant_app ,
+        event_credit_grant_app_cost,
+        event_order_paid ,
+        event_order_paid_purchase_amount,
+        event_jin_jian_landing_page ,
+        event_jin_jian_landing_page_cost ,
+        event_credit_grant_landing_page ,
+        event_credit_grant_landing_page_cost,
+        event_credit_grant_landing_ratio ,
+        event_next_day_stay_cost ,
+        event_next_day_stay_ratio ,
+        form_action_ratio ,
+        event_order_paid_cost ,
+        event_next_day_stay ,
+        form_cost ,
+        form_count ,
+        play_3s_ratio ,
+        stat_hour ,
+        click_1k_cost ,
+        event_valid_clues ,
+        event_valid_clues_cost,
+        ad_product_cnt ,
+        event_goods_view ,
+        merchant_reco_fans ,
+        event_order_amount_roi ,
+        event_new_user_pay ,
+        event_new_user_pay_cost ,
+        event_new_user_pay_ratio ,
+        event_button_click ,
+        event_button_click_cost ,
+        event_button_click_ratio ,
+        play_5s_ratio ,
+        play_end_ratio ,
+        event_order_paid_roi,
+        event_new_user_jinjian_app ,
+        event_new_user_jinjian_app_cost,
+        event_new_user_jinjian_app_roi ,
+        event_new_user_credit_grant_app ,
+        event_new_user_credit_grant_app_cost,
+        event_new_user_credit_grant_app_roi ,
+        event_new_user_jinjian_page ,
+        event_new_user_jinjian_page_cost ,
+        event_new_user_jinjian_page_roi ,
+        event_new_user_credit_grant_page ,
+        event_new_user_credit_grant_page_cost ,
+        event_new_user_credit_grant_page_roi ,
+        event_appoint_form ,
+        event_appoint_form_cost,
+        event_appoint_form_ratio,
+        event_appoint_jump_click ,
+        event_appoint_jump_click_cost,
+        event_appoint_jump_click_ratio,
+        union_event_pay_purchase_amount_7d ,
+        province ,
+        event_app_invoked ,
+        union_event_pay_purchase_amount_7d_roi,
+        event_add_shopping_cart_cost ,
+        gender ,
+        city ,
+        event_ad_watch_times_ratio ,
+        shares ,
+        business_interest_tags ,
+        event_watch_app_ad ,
+        event_multi_conversion_cost,
+        merchant_reco_fans_cost ,
+        ad_scene ,
+        event_ad_watch_times_cost ,
+        event_add_shopping_cart ,
+        age_segment ,
+        photo_like ,
+        event_add_wechat ,
+        event_add_wechat_cost,
+        event_add_wechat_ratio,
+        event_app_invoked_cost ,
+        event_multi_conversion ,
+        event_dsp_gift_form ,
+        event_app_invoked_ratio ,
+        photo_show ,
+        event_multi_conversion_ratio,
+        client ,
+        event_goods_view_cost ,
+        event_credit_grant_app_ratio,
+        event_ad_watch_times ,
+        comments
+        )
+        values
+        <foreach collection="data" item="da" separator=",">
+            (
+            #{da.accountId},
+            #{da.planId},
+            #{da.unitId},
+            #{da.placementType},
+            #{da.statDate},
+            #{da.aclick},
+            #{da.bclick},
+            #{da.photoClickCost},
+            #{da.follow},
+            #{da.cancelFollow},
+            #{da.report},
+            #{da.block},
+            #{da.negative},
+            #{da.downloadStarted},
+            #{da.downloadCompleted},
+            #{da.activation},
+            #{da.submit},
+            #{da.photoClick},
+            #{da.photoClickRatio},
+            #{da.charge},
+            #{da.actionRatio},
+            #{da.impression_1kCost},
+            #{da.actionCost},
+            #{da.eventPayFirstDay},
+            #{da.eventPayPurchaseAmountFirstDay},
+            #{da.eventPayFirstDayRoi},
+            #{da.eventPay},
+            #{da.eventPayPurchaseAmount},
+            #{da.eventPayRoi},
+            #{da.eventRegister},
+            #{da.eventRegisterCost},
+            #{da.eventRegisterRatio},
+            #{da.eventJinJianApp},
+            #{da.eventJinJianAppCost},
+            #{da.eventCreditGrantApp},
+            #{da.eventCreditGrantAppCost},
+            #{da.eventOrderPaid},
+            #{da.eventOrderPaidPurchaseAmount},
+            #{da.eventJinJianLandingPage},
+            #{da.eventJinJianLandingPageCost},
+            #{da.eventCreditGrantLandingPage},
+            #{da.eventCreditGrantLandingPageCost},
+            #{da.eventCreditGrantLandingRatio},
+            #{da.eventNextDayStayCost},
+            #{da.eventNextDayStayRatio},
+            #{da.formActionRatio},
+            #{da.eventOrderPaidCost},
+            #{da.eventNextDayStay},
+            #{da.formCost},
+            #{da.formCount},
+            #{da.play_3sRatio},
+            #{da.statHour},
+            #{da.click_1kCost},
+            #{da.eventValidClues},
+            #{da.eventValidCluesCost},
+            #{da.adProductCnt},
+            #{da.eventGoodsView},
+            #{da.merchantRecoFans},
+            #{da.eventOrderAmountRoi},
+            #{da.eventNewUserPay},
+            #{da.eventNewUserPayCost},
+            #{da.eventNewUserPayRatio},
+            #{da.eventButtonClick},
+            #{da.eventButtonClickCost},
+            #{da.eventButtonClickRatio},
+            #{da.play_5sRatio},
+            #{da.playEndRatio},
+            #{da.eventOrderPaidRoi},
+            #{da.eventNewUserJinjianApp},
+            #{da.eventNewUserJinjianAppCost},
+            #{da.eventNewUserJinjianAppRoi},
+            #{da.eventNewUserCreditGrantApp},
+            #{da.eventNewUserCreditGrantAppCost},
+            #{da.eventNewUserCreditGrantAppRoi},
+            #{da.eventNewUserJinjianPage},
+            #{da.eventNewUserJinjianPageCost},
+            #{da.eventNewUserJinjianPageRoi},
+            #{da.eventNewUserCreditGrantPage},
+            #{da.eventNewUserCreditGrantPageCost},
+            #{da.eventNewUserCreditGrantPageRoi},
+            #{da.eventAppointForm},
+            #{da.eventAppointFormCost},
+            #{da.eventAppointFormRatio},
+            #{da.eventAppointJumpClick},
+            #{da.eventAppointJumpClickCost},
+            #{da.eventAppointJumpClickRatio},
+            #{da.unionEventPayPurchaseAmount_7d},
+            #{da.province},
+            #{da.eventAppInvoked},
+            #{da.unionEventPayPurchaseAmount_7dRoi},
+            #{da.eventAddShoppingCartCost},
+            #{da.gender},
+            #{da.city},
+            #{da.eventAdWatchTimesRatio},
+            #{da.shares},
+            #{da.businessInterestTags},
+            #{da.eventWatchAppAd},
+            #{da.eventMultiConversionCost},
+            #{da.merchantRecoFansCost},
+            #{da.adScene},
+            #{da.eventAdWatchTimesCost},
+            #{da.eventAddShoppingCart},
+            #{da.ageSegment},
+            #{da.photoLike},
+            #{da.eventAddWechat},
+            #{da.eventAddWechatCost},
+            #{da.eventAddWechatRatio},
+            #{da.eventAppInvokedCost},
+            #{da.eventMultiConversion},
+            #{da.eventDspGiftForm},
+            #{da.eventAppInvokedRatio},
+            #{da.photoShow},
+            #{da.eventMultiConversionRatio},
+            #{da.client},
+            #{da.eventGoodsViewCost},
+            #{da.eventCreditGrantAppRatio},
+            #{da.eventAdWatchTimes},
+            #{da.comments}
+            )
+        </foreach>
+    </insert>
 
 </mapper>

+ 8 - 9
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouAudienceReportDailyServiceImpl.java

@@ -32,10 +32,7 @@ import cn.com.ctop.kuaishou.modules.report.service.IKuaishouAudienceReportDailyS
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.github.pagehelper.PageHelper;
-import com.github.pagehelper.PageInfo;
 import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.api.vo.Result;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -190,19 +187,21 @@ public class KuaishouAudienceReportDailyServiceImpl extends ServiceImpl<Kuaishou
                                 }
                             }
                             if ("province".equals(type)) {
-                                dailyProvinceService.saveBatch(provinceList);
+                                provinceMapper.replaceBatch(provinceList);
                             } else if ("city".equals(type)) {
-                                dailyCityService.saveBatch(cityList);
+                                cityMapper.replaceBatch(cityList);
                             } else if ("gender".equals(type)) {
-                                dailyGenderService.saveBatch(genderList);
+                                genderMapper.replaceBatch(genderList);
                             } else if ("ageSegment".equals(type)) {
-                                dailyAgeService.saveBatch(ageList);
+                                ageMapper.replaceBatch(ageList);
                             } else if ("clientId".equals(type)) {
-                                dailyClientService.saveBatch(clientList);
+                                clientMapper.replaceBatch(clientList);
                             } else if ("businessInterestTags".equals(type)) {
-                                dailyBusinessService.saveBatch(businessList);
+                                bussinessMapper.replaceBatch(businessList);
                             }
                         }
+                    } else {
+                        log.error("-----------未查询到人群分析报表数据:unitId:{},日期:{}", unit, date);
                     }
                 } else {
                     log.error("查询人群分析报表数据返回信息错误:accountId:{},返回信息:{}", token.getAccountId(), resultJson);