浏览代码

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaishouVideoRelateCreativesService.java
#	module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouVideoRelateCreativesServiceImpl.java
syh 4 年之前
父节点
当前提交
dddc99419d
共有 26 个文件被更改,包括 1432 次插入29 次删除
  1. 1 0
      jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java
  2. 3 3
      jeecg-boot-module-system/src/main/resources/application-dev.yml
  3. 3 3
      jeecg-boot-module-system/src/main/resources/jeecg/jeecg_database.properties
  4. 69 23
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/KuaiShouMaterialControer.java
  5. 236 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouBatchCampaignTemplateController.java
  6. 248 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouBatchCreativeTemplateController.java
  7. 248 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouBatchGroupTemplateController.java
  8. 105 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouBatchCampaignTemplate.java
  9. 119 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouBatchCreativeTemplate.java
  10. 167 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouBatchGroupTemplate.java
  11. 15 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouBatchCampaignTemplateMapper.java
  12. 15 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouBatchCreativeTemplateMapper.java
  13. 15 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouBatchGroupTemplateMapper.java
  14. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaishouVideoRelateCreativesMapper.java
  15. 5 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouBatchCampaignTemplateMapper.xml
  16. 5 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouBatchCreativeTemplateMapper.xml
  17. 5 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouBatchGroupTemplateMapper.xml
  18. 55 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaishouVideoRelateCreativesMapper.xml
  19. 14 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouBatchCampaignTemplateService.java
  20. 14 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouBatchCreativeTemplateService.java
  21. 14 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouBatchGroupTemplateService.java
  22. 4 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaishouVideoRelateCreativesService.java
  23. 19 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouBatchCampaignTemplateServiceImpl.java
  24. 19 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouBatchCreativeTemplateServiceImpl.java
  25. 19 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouBatchGroupTemplateServiceImpl.java
  26. 11 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouVideoRelateCreativesServiceImpl.java

+ 1 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java

@@ -183,6 +183,7 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/ruleGroup/*", "anon");
         filterChainDefinitionMap.put("/kuaishou/material/*", "anon");
         filterChainDefinitionMap.put("/kuaishou/create/*", "anon");
+        filterChainDefinitionMap.put("/template/kuaiShouBatchCampaignTemplate/*", "anon");
 
         // 添加自己的过滤器并且取名为jwt
         Map<String, Filter> filterMap = new HashMap<>(1);

+ 3 - 3
jeecg-boot-module-system/src/main/resources/application-dev.yml

@@ -135,9 +135,9 @@ spring:
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
       datasource:
         master:
-          url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&allowMultiQueries=true
-          username: data
-          password: hcst@2021
+          url: jdbc:mysql://139.186.151.174:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&allowMultiQueries=true
+          username: hcst
+          password: hcst@2020
           driver-class-name: com.mysql.jdbc.Driver
           # 多数据源配置
           #multi-datasource1:

+ 3 - 3
jeecg-boot-module-system/src/main/resources/jeecg/jeecg_database.properties

@@ -1,8 +1,8 @@
 #mysql
 diver_name=com.mysql.jdbc.Driver
-url=jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-username=data
-password=hcst@2021
+url=jdbc:mysql://139.186.151.174:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+username=hcst
+password=hcst@2020
 database_name=jeecg-boot
 #oracle
 #diver_name=oracle.jdbc.driver.OracleDriver

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

@@ -104,9 +104,14 @@ public class KuaiShouMaterialControer {
     }
 
 
+    /**
+     * 历史素材
+     *
+     * @param requestJson
+     * @return
+     */
     @PostMapping(value = "/getHistoryVideoList")
     public JSONObject getHistoryVideoList(@RequestBody JSONObject requestJson) {
-        System.err.println(requestJson);
         JSONObject returnJson = new JSONObject();
         try {
             if (Check.isNull(requestJson)) {
@@ -116,8 +121,6 @@ public class KuaiShouMaterialControer {
             if (Check.isNull(accountId)) {
                 throw new Exception("账户id不能为空");
             }
-
-
             String startDate = requestJson.getString("startDate");
             if (Check.isNull(startDate)) {
                 throw new Exception("请输入开始查询时间");
@@ -127,17 +130,14 @@ public class KuaiShouMaterialControer {
             if (Check.isNull(endDate)) {
                 throw new Exception("请输入结束查询时间");
             }
-
             Integer createCount = requestJson.getInteger("createCount");
             if (Check.isNull(createCount) || createCount == 0) {
                 throw new Exception("请输入最小关联数");
             }
-
             Integer num = requestJson.getInteger("num");
             if (Check.isNull(num) || num == 0) {
                 throw new Exception("请输入查询条数");
             }
-
             Map<String, Object> requestMap = new HashMap<>();
             requestMap.put("startTime", startDate);
             requestMap.put("endTime", endDate);
@@ -174,6 +174,12 @@ public class KuaiShouMaterialControer {
     }
 
 
+    /**
+     * 历史Top素材
+     *
+     * @param requestJson
+     * @return
+     */
     @PostMapping(value = "/getHistoryTopVideoList")
     public JSONObject getHistoryTopVideoList(@RequestBody JSONObject requestJson) {
         JSONObject returnJson = new JSONObject();
@@ -185,35 +191,75 @@ public class KuaiShouMaterialControer {
             if (Check.isNull(accountId)) {
                 throw new Exception("账户id不能为空");
             }
-
-
-            String startDate = requestJson.getString("startDate");
+            String startDate = requestJson.getString("startTime");
             if (Check.isNull(startDate)) {
                 throw new Exception("请输入开始查询时间");
             }
-
-            String endDate = requestJson.getString("endDate");
+            String endDate = requestJson.getString("endTime");
             if (Check.isNull(endDate)) {
                 throw new Exception("请输入结束查询时间");
             }
-
-            Integer createCount = requestJson.getInteger("createCount");
-            if (Check.isNull(createCount) || createCount == 0) {
-                throw new Exception("请输入最小关联数");
-            }
-
             Integer num = requestJson.getInteger("num");
             if (Check.isNull(num) || num == 0) {
                 throw new Exception("请输入查询条数");
             }
-
             Map<String, Object> requestMap = new HashMap<>();
-            requestMap.put("startTime", startDate);
-            requestMap.put("endTime", endDate);
+            requestMap.put("startDate", startDate);
+            requestMap.put("endDate", endDate);
             requestMap.put("accountId", accountId);
             requestMap.put("num", num);
-            requestMap.put("createCount", createCount);
-            List<JSONObject> materialList = relateCreativesService.getVideoListByMap(requestMap);
+            List<JSONObject> materialList = relateCreativesService.getHistoryTopVideoList(requestMap);
+            if (!Check.isNull(materialList)) {
+                for (int i = 0; i < materialList.size(); i++) {
+                    JSONObject materialJson = materialList.get(i);
+                    String signature = materialJson.getString("signature");
+                    List<String> imageList = lastTimeService.getImageListByMd5(signature);
+                    materialJson.put("imageList", imageList);
+
+                }
+                returnJson.put("code", 0);
+                returnJson.put("message", "SUCCESS");
+                returnJson.put("data", materialList);
+            } else {
+                returnJson.put("code", -1);
+                returnJson.put("message", "暂未历史爆量素材");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            returnJson.put("code", -1);
+            returnJson.put("message", e.getMessage());
+        }
+        return returnJson;
+    }
+
+
+    /**
+     * 关联创意数为0素材
+     *
+     * @param requestJson
+     * @return
+     */
+    @PostMapping(value = "/getCreateZeroVideoList")
+    public JSONObject getHistoryCreateVideoList(@RequestBody JSONObject requestJson) {
+        JSONObject returnJson = new JSONObject();
+        try {
+            if (Check.isNull(requestJson)) {
+                throw new Exception("入参不能为空");
+            }
+            Long accountId = requestJson.getLong("accountId");
+            if (Check.isNull(accountId)) {
+                throw new Exception("账户id不能为空");
+            }
+
+            Integer videoCnt = requestJson.getInteger("videoCnt");
+            if (Check.isNull(videoCnt)) {
+                throw new Exception("请输入查询条数");
+            }
+            Map<String, Object> requestMap = new HashMap<>();
+            requestMap.put("accountId", accountId);
+            requestMap.put("creativeCount", 0);
+            requestMap.put("videoCnt", videoCnt);
+            List<JSONObject> materialList = relateCreativesService.getVideoZeroListByMap(requestMap);
             if (!Check.isNull(materialList)) {
                 for (int i = 0; i < materialList.size(); i++) {
                     JSONObject materialJson = materialList.get(i);
@@ -232,7 +278,7 @@ public class KuaiShouMaterialControer {
                 returnJson.put("data", materialList);
             } else {
                 returnJson.put("code", -1);
-                returnJson.put("message", "暂未新上素材");
+                returnJson.put("message", "暂未关联创意数为0素材");
             }
         } catch (Exception e) {
             e.printStackTrace();

+ 236 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouBatchCampaignTemplateController.java

@@ -0,0 +1,236 @@
+package cn.com.ctop.kuaishou.modules.batch.controller;
+
+import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCampaignTemplate;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchCampaignTemplateService;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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.system.query.QueryGenerator;
+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-01-19
+ */
+@Slf4j
+@Api(tags = "计划模板")
+@RestController
+@RequestMapping("/template/kuaiShouBatchCampaignTemplate")
+public class KuaiShouBatchCampaignTemplateController {
+    @Autowired
+    private IKuaiShouBatchCampaignTemplateService kuaiShouBatchCampaignTemplateService;
+
+    @AutoLog(value = "计划模板-分页列表查询")
+    @ApiOperation(value = "计划模板-分页列表查询", notes = "计划模板-分页列表查询")
+    @GetMapping(value = "/getCampaignTemplate")
+    public Result<KuaiShouBatchCampaignTemplate> queryPageList(Long accountId) {
+        Result<KuaiShouBatchCampaignTemplate> result = new Result<>();
+        QueryWrapper<KuaiShouBatchCampaignTemplate> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("account_id", accountId);
+        queryWrapper.orderByDesc("create_time");
+        queryWrapper.last("limit 1");
+        KuaiShouBatchCampaignTemplate one = kuaiShouBatchCampaignTemplateService.getOne(queryWrapper);
+        result.setSuccess(true);
+        result.setResult(one);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param kuaiShouBatchCampaignTemplate
+     * @return
+     */
+    @AutoLog(value = "计划模板-添加")
+    @ApiOperation(value = "计划模板-添加", notes = "计划模板-添加")
+    @PostMapping(value = "/add")
+    public Result<KuaiShouBatchCampaignTemplate> add(@RequestBody KuaiShouBatchCampaignTemplate kuaiShouBatchCampaignTemplate) {
+        Result<KuaiShouBatchCampaignTemplate> result = new Result<>();
+        try {
+            kuaiShouBatchCampaignTemplateService.save(kuaiShouBatchCampaignTemplate);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param kuaiShouBatchCampaignTemplate
+     * @return
+     */
+    @AutoLog(value = "计划模板-编辑")
+    @ApiOperation(value = "计划模板-编辑", notes = "计划模板-编辑")
+    @PutMapping(value = "/edit")
+    public Result<KuaiShouBatchCampaignTemplate> edit(@RequestBody KuaiShouBatchCampaignTemplate kuaiShouBatchCampaignTemplate) {
+        Result<KuaiShouBatchCampaignTemplate> result = new Result<KuaiShouBatchCampaignTemplate>();
+        KuaiShouBatchCampaignTemplate kuaiShouBatchCampaignTemplateEntity = kuaiShouBatchCampaignTemplateService.getById(kuaiShouBatchCampaignTemplate.getId());
+        if (kuaiShouBatchCampaignTemplateEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = kuaiShouBatchCampaignTemplateService.updateById(kuaiShouBatchCampaignTemplate);
+            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 {
+            kuaiShouBatchCampaignTemplateService.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<KuaiShouBatchCampaignTemplate> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<KuaiShouBatchCampaignTemplate> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.kuaiShouBatchCampaignTemplateService.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<KuaiShouBatchCampaignTemplate> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<KuaiShouBatchCampaignTemplate> result = new Result<>();
+        KuaiShouBatchCampaignTemplate kuaiShouBatchCampaignTemplate = kuaiShouBatchCampaignTemplateService.getById(id);
+        if (kuaiShouBatchCampaignTemplate == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(kuaiShouBatchCampaignTemplate);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<KuaiShouBatchCampaignTemplate> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                KuaiShouBatchCampaignTemplate kuaiShouBatchCampaignTemplate = JSON.parseObject(deString, KuaiShouBatchCampaignTemplate.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouBatchCampaignTemplate, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<KuaiShouBatchCampaignTemplate> pageList = kuaiShouBatchCampaignTemplateService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "计划模板列表");
+        mv.addObject(NormalExcelConstants.CLASS, KuaiShouBatchCampaignTemplate.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<KuaiShouBatchCampaignTemplate> listKuaiShouBatchCampaignTemplates = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouBatchCampaignTemplate.class, params);
+                kuaiShouBatchCampaignTemplateService.saveBatch(listKuaiShouBatchCampaignTemplates);
+                return Result.ok("文件导入成功!数据行数:" + listKuaiShouBatchCampaignTemplates.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("文件导入失败!");
+    }
+
+}

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

@@ -0,0 +1,248 @@
+package cn.com.ctop.kuaishou.modules.batch.controller;
+
+import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCreativeTemplate;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchCreativeTemplateService;
+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.system.query.QueryGenerator;
+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-01-19
+ */
+@Slf4j
+@Api(tags = "创意模板")
+@RestController
+@RequestMapping("/template/kuaiShouBatchCreativeTemplate")
+public class KuaiShouBatchCreativeTemplateController {
+    @Autowired
+    private IKuaiShouBatchCreativeTemplateService kuaiShouBatchCreativeTemplateService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param kuaiShouBatchCreativeTemplate
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "创意模板-分页列表查询")
+    @ApiOperation(value = "创意模板-分页列表查询", notes = "创意模板-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<KuaiShouBatchCreativeTemplate>> queryPageList(KuaiShouBatchCreativeTemplate kuaiShouBatchCreativeTemplate,
+                                                                      @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                      @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                      HttpServletRequest req) {
+        Result<IPage<KuaiShouBatchCreativeTemplate>> result = new Result<>();
+        QueryWrapper<KuaiShouBatchCreativeTemplate> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouBatchCreativeTemplate, req.getParameterMap());
+        Page<KuaiShouBatchCreativeTemplate> page = new Page<KuaiShouBatchCreativeTemplate>(pageNo, pageSize);
+        IPage<KuaiShouBatchCreativeTemplate> pageList = kuaiShouBatchCreativeTemplateService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param kuaiShouBatchCreativeTemplate
+     * @return
+     */
+    @AutoLog(value = "创意模板-添加")
+    @ApiOperation(value = "创意模板-添加", notes = "创意模板-添加")
+    @PostMapping(value = "/add")
+    public Result<KuaiShouBatchCreativeTemplate> add(@RequestBody KuaiShouBatchCreativeTemplate kuaiShouBatchCreativeTemplate) {
+        Result<KuaiShouBatchCreativeTemplate> result = new Result<>();
+        try {
+            kuaiShouBatchCreativeTemplateService.save(kuaiShouBatchCreativeTemplate);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param kuaiShouBatchCreativeTemplate
+     * @return
+     */
+    @AutoLog(value = "创意模板-编辑")
+    @ApiOperation(value = "创意模板-编辑", notes = "创意模板-编辑")
+    @PutMapping(value = "/edit")
+    public Result<KuaiShouBatchCreativeTemplate> edit(@RequestBody KuaiShouBatchCreativeTemplate kuaiShouBatchCreativeTemplate) {
+        Result<KuaiShouBatchCreativeTemplate> result = new Result<KuaiShouBatchCreativeTemplate>();
+        KuaiShouBatchCreativeTemplate kuaiShouBatchCreativeTemplateEntity = kuaiShouBatchCreativeTemplateService.getById(kuaiShouBatchCreativeTemplate.getId());
+        if (kuaiShouBatchCreativeTemplateEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = kuaiShouBatchCreativeTemplateService.updateById(kuaiShouBatchCreativeTemplate);
+            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 {
+            kuaiShouBatchCreativeTemplateService.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<KuaiShouBatchCreativeTemplate> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<KuaiShouBatchCreativeTemplate> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.kuaiShouBatchCreativeTemplateService.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<KuaiShouBatchCreativeTemplate> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<KuaiShouBatchCreativeTemplate> result = new Result<>();
+        KuaiShouBatchCreativeTemplate kuaiShouBatchCreativeTemplate = kuaiShouBatchCreativeTemplateService.getById(id);
+        if (kuaiShouBatchCreativeTemplate == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(kuaiShouBatchCreativeTemplate);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<KuaiShouBatchCreativeTemplate> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                KuaiShouBatchCreativeTemplate kuaiShouBatchCreativeTemplate = JSON.parseObject(deString, KuaiShouBatchCreativeTemplate.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouBatchCreativeTemplate, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<KuaiShouBatchCreativeTemplate> pageList = kuaiShouBatchCreativeTemplateService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "创意模板列表");
+        mv.addObject(NormalExcelConstants.CLASS, KuaiShouBatchCreativeTemplate.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<KuaiShouBatchCreativeTemplate> listKuaiShouBatchCreativeTemplates = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouBatchCreativeTemplate.class, params);
+                kuaiShouBatchCreativeTemplateService.saveBatch(listKuaiShouBatchCreativeTemplates);
+                return Result.ok("文件导入成功!数据行数:" + listKuaiShouBatchCreativeTemplates.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("文件导入失败!");
+    }
+
+}

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

@@ -0,0 +1,248 @@
+package cn.com.ctop.kuaishou.modules.batch.controller;
+
+import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchGroupTemplate;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchGroupTemplateService;
+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.system.query.QueryGenerator;
+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-01-19
+ */
+@Slf4j
+@Api(tags = "创意模板")
+@RestController
+@RequestMapping("/template/kuaiShouBatchGroupTemplate")
+public class KuaiShouBatchGroupTemplateController {
+    @Autowired
+    private IKuaiShouBatchGroupTemplateService kuaiShouBatchGroupTemplateService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param kuaiShouBatchGroupTemplate
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "创意模板-分页列表查询")
+    @ApiOperation(value = "创意模板-分页列表查询", notes = "创意模板-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<KuaiShouBatchGroupTemplate>> queryPageList(KuaiShouBatchGroupTemplate kuaiShouBatchGroupTemplate,
+                                                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                   HttpServletRequest req) {
+        Result<IPage<KuaiShouBatchGroupTemplate>> result = new Result<>();
+        QueryWrapper<KuaiShouBatchGroupTemplate> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouBatchGroupTemplate, req.getParameterMap());
+        Page<KuaiShouBatchGroupTemplate> page = new Page<KuaiShouBatchGroupTemplate>(pageNo, pageSize);
+        IPage<KuaiShouBatchGroupTemplate> pageList = kuaiShouBatchGroupTemplateService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param kuaiShouBatchGroupTemplate
+     * @return
+     */
+    @AutoLog(value = "创意模板-添加")
+    @ApiOperation(value = "创意模板-添加", notes = "创意模板-添加")
+    @PostMapping(value = "/add")
+    public Result<KuaiShouBatchGroupTemplate> add(@RequestBody KuaiShouBatchGroupTemplate kuaiShouBatchGroupTemplate) {
+        Result<KuaiShouBatchGroupTemplate> result = new Result<>();
+        try {
+            kuaiShouBatchGroupTemplateService.save(kuaiShouBatchGroupTemplate);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param kuaiShouBatchGroupTemplate
+     * @return
+     */
+    @AutoLog(value = "创意模板-编辑")
+    @ApiOperation(value = "创意模板-编辑", notes = "创意模板-编辑")
+    @PutMapping(value = "/edit")
+    public Result<KuaiShouBatchGroupTemplate> edit(@RequestBody KuaiShouBatchGroupTemplate kuaiShouBatchGroupTemplate) {
+        Result<KuaiShouBatchGroupTemplate> result = new Result<KuaiShouBatchGroupTemplate>();
+        KuaiShouBatchGroupTemplate kuaiShouBatchGroupTemplateEntity = kuaiShouBatchGroupTemplateService.getById(kuaiShouBatchGroupTemplate.getId());
+        if (kuaiShouBatchGroupTemplateEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = kuaiShouBatchGroupTemplateService.updateById(kuaiShouBatchGroupTemplate);
+            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 {
+            kuaiShouBatchGroupTemplateService.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<KuaiShouBatchGroupTemplate> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<KuaiShouBatchGroupTemplate> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.kuaiShouBatchGroupTemplateService.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<KuaiShouBatchGroupTemplate> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<KuaiShouBatchGroupTemplate> result = new Result<>();
+        KuaiShouBatchGroupTemplate kuaiShouBatchGroupTemplate = kuaiShouBatchGroupTemplateService.getById(id);
+        if (kuaiShouBatchGroupTemplate == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(kuaiShouBatchGroupTemplate);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<KuaiShouBatchGroupTemplate> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                KuaiShouBatchGroupTemplate kuaiShouBatchGroupTemplate = JSON.parseObject(deString, KuaiShouBatchGroupTemplate.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouBatchGroupTemplate, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<KuaiShouBatchGroupTemplate> pageList = kuaiShouBatchGroupTemplateService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "创意模板列表");
+        mv.addObject(NormalExcelConstants.CLASS, KuaiShouBatchGroupTemplate.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<KuaiShouBatchGroupTemplate> listKuaiShouBatchGroupTemplates = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouBatchGroupTemplate.class, params);
+                kuaiShouBatchGroupTemplateService.saveBatch(listKuaiShouBatchGroupTemplates);
+                return Result.ok("文件导入成功!数据行数:" + listKuaiShouBatchGroupTemplates.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("文件导入失败!");
+    }
+
+}

+ 105 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouBatchCampaignTemplate.java

@@ -0,0 +1,105 @@
+package cn.com.ctop.kuaishou.modules.batch.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+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 java.util.Date;
+
+/**
+ * 计划模板
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2021-01-19
+ */
+@Data
+@TableName("ctop_kuaishou_batch_campaign_template")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_kuaishou_batch_campaign_template对象", description = "计划模板")
+public class KuaiShouBatchCampaignTemplate {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID", width = 15)
+    @ApiModelProperty(value = "账户ID")
+    private Long accountId;
+    /**
+     * 计划名称
+     */
+    @Excel(name = "计划名称", width = 15)
+    @ApiModelProperty(value = "计划名称")
+    private String campaignName;
+    /**
+     * 营销目标:2:提升应用安装;5:收集销售线索
+     */
+    @Excel(name = "营销目标:2:提升应用安装;5:收集销售线索", width = 15)
+    @ApiModelProperty(value = "营销目标:2:提升应用安装;5:收集销售线索")
+    private Integer campaignType;
+    /**
+     * 计划状态 0关闭,1开启
+     */
+    @Excel(name = "计划状态 0关闭,1开启", width = 15)
+    @ApiModelProperty(value = "计划状态 0关闭,1开启")
+    private Integer campaignStatus;
+    /**
+     * 组状态 1:投放中;2:暂停
+     */
+    @Excel(name = "组状态 1:投放中;2:暂停", width = 15)
+    @ApiModelProperty(value = "组状态 1:投放中;2:暂停")
+    private Integer unitStatus;
+    /**
+     * 每日预算
+     */
+    @Excel(name = "每日预算", width = 15)
+    @ApiModelProperty(value = "每日预算")
+    private Long dayBudget;
+    /**
+     * dayBudgetSchedule
+     */
+    @Excel(name = "dayBudgetSchedule", width = 15)
+    @ApiModelProperty(value = "dayBudgetSchedule")
+    private String dayBudgetSchedule;
+    /**
+     * 创建时间
+     */
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * updateTime
+     */
+    @ApiModelProperty(value = "updateTime")
+    private Date updateTime;
+    /**
+     * 推广平台 ios,android
+     */
+    @Excel(name = "推广平台 ios,android", width = 15)
+    @ApiModelProperty(value = "推广平台 ios,android")
+    private String systemType;
+    /**
+     * 是否定时启动
+     */
+    @Excel(name = "是否定时启动", width = 15)
+    @ApiModelProperty(value = "是否定时启动")
+    private String isTime;
+    /**
+     * 启动时间
+     */
+    @Excel(name = "启动时间", width = 15)
+    @ApiModelProperty(value = "启动时间")
+    private String timeStart;
+}

+ 119 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouBatchCreativeTemplate.java

@@ -0,0 +1,119 @@
+package cn.com.ctop.kuaishou.modules.batch.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-01-19
+ */
+@Data
+@TableName("ctop_kuaishou_batch_creative_template")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_kuaishou_batch_creative_template对象", description = "创意模板")
+public class KuaiShouBatchCreativeTemplate {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID", width = 15)
+    @ApiModelProperty(value = "账户ID")
+    private Long accountId;
+    /**
+     * 创意制作方式 4: 自定义;5:程序化创意 7:程序化创意2.0
+     */
+    @Excel(name = "创意制作方式 4: 自定义;5:程序化创意 7:程序化创意2.0", width = 15)
+    @ApiModelProperty(value = "创意制作方式 4: 自定义;5:程序化创意 7:程序化创意2.0")
+    private Integer unitType;
+    /**
+     * 行动号召按钮文案
+     */
+    @Excel(name = "行动号召按钮文案", width = 15)
+    @ApiModelProperty(value = "行动号召按钮文案")
+    private String actionBarText;
+    /**
+     * 自动发送礼包码 发送时机	android(支持的类型):如果选择「优先从系统应用商店下载」(use_app_market 为 1):2:检测到用户行为(actionBar 点击)没有选择优先应用商店下载:30: 开始下载后;31:下载完成后;32:安装完成后ios(ios支持的类型):2:检测到用户行为(actionBar 点击)
+     */
+    @Excel(name = "自动发送礼包码 发送时机	android(支持的类型):如果选择「优先从系统应用商店下载」(use_app_market 为 1):2:检测到用户行为(actionBar 点击)没有选择优先应用商店下载:30: 开始下载后;31:下载完成后;32:安装完成后ios(ios支持的类型):2:检测到用户行为(actionBar 点击)", width = 15)
+    @ApiModelProperty(value = "自动发送礼包码 发送时机	android(支持的类型):如果选择「优先从系统应用商店下载」(use_app_market 为 1):2:检测到用户行为(actionBar 点击)没有选择优先应用商店下载:30: 开始下载后;31:下载完成后;32:安装完成后ios(ios支持的类型):2:检测到用户行为(actionBar 点击)")
+    private Integer targetActionType;
+    /**
+     * 游戏礼包码
+     */
+    @Excel(name = "游戏礼包码", width = 15)
+    @ApiModelProperty(value = "游戏礼包码")
+    private String code;
+    /**
+     * 推荐理由
+     */
+    @Excel(name = "推荐理由", width = 15)
+    @ApiModelProperty(value = "推荐理由")
+    private String newExposeTag;
+    /**
+     * 应用下载详情页
+     */
+    @Excel(name = "应用下载详情页", width = 15)
+    @ApiModelProperty(value = "应用下载详情页")
+    private Long siteId;
+    /**
+     * 封面广告语标题
+     */
+    @Excel(name = "封面广告语标题", width = 15)
+    @ApiModelProperty(value = "封面广告语标题")
+    private String stickerTitle;
+    /**
+     * 贴纸样式类型
+     */
+    @Excel(name = "贴纸样式类型", width = 15)
+    @ApiModelProperty(value = "贴纸样式类型")
+    private String overlayType;
+    /**
+     * 创意分类
+     */
+    @Excel(name = "创意分类", width = 15)
+    @ApiModelProperty(value = "创意分类")
+    private Integer creativeCategory;
+    /**
+     * 创意标签
+     */
+    @Excel(name = "创意标签", width = 15)
+    @ApiModelProperty(value = "创意标签")
+    private String creativeTag;
+    /**
+     * 创建时间
+     */
+    @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;
+    /**
+     * updateTime
+     */
+    @Excel(name = "updateTime", 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 = "updateTime")
+    private Date updateTime;
+}

+ 167 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouBatchGroupTemplate.java

@@ -0,0 +1,167 @@
+package cn.com.ctop.kuaishou.modules.batch.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-01-19
+ */
+@Data
+@TableName("ctop_kuaishou_batch_group_template")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_kuaishou_batch_group_template对象", description = "创意模板")
+public class KuaiShouBatchGroupTemplate {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID", width = 15)
+    @ApiModelProperty(value = "账户ID")
+    private Long accountId;
+    /**
+     * 资源位置:1:优选广告位;3:视频播放页广告-便利贴广告(不支持深度转化目标的优化);5:联盟广告;6:上下滑大屏广告;7:信息流广告;;3、6、7可多选
+     */
+    @Excel(name = "资源位置:1:优选广告位;3:视频播放页广告-便利贴广告(不支持深度转化目标的优化);5:联盟广告;6:上下滑大屏广告;7:信息流广告;;3、6、7可多选", width = 15)
+    @ApiModelProperty(value = "资源位置:1:优选广告位;3:视频播放页广告-便利贴广告(不支持深度转化目标的优化);5:联盟广告;6:上下滑大屏广告;7:信息流广告;;3、6、7可多选")
+    private String sceneId;
+    /**
+     * 优先从系统应用商店下载
+     */
+    @Excel(name = "优先从系统应用商店下载", width = 15)
+    @ApiModelProperty(value = "优先从系统应用商店下载")
+    private Integer useAppMarket;
+    /**
+     * 应用列表
+     */
+    @Excel(name = "应用列表", width = 15)
+    @ApiModelProperty(value = "应用列表")
+    private String appStore;
+    /**
+     * 广告组名称
+     */
+    @Excel(name = "广告组名称", width = 15)
+    @ApiModelProperty(value = "广告组名称")
+    private String unitName;
+    /**
+     * 1 - 加速投放;2 - 平滑投放;3-优先低成本(投放时间范围只可为全天;预算不可为不限或空)
+     */
+    @Excel(name = "1 - 加速投放;2 - 平滑投放;3-优先低成本(投放时间范围只可为全天;预算不可为不限或空)", width = 15)
+    @ApiModelProperty(value = "1 - 加速投放;2 - 平滑投放;3-优先低成本(投放时间范围只可为全天;预算不可为不限或空)")
+    private Integer speed;
+    /**
+     * 单日预算
+     */
+    @Excel(name = "单日预算", width = 15)
+    @ApiModelProperty(value = "单日预算")
+    private Long dayBudget;
+    /**
+     * 投放开始时间
+     */
+    @Excel(name = "投放开始时间", width = 15)
+    @ApiModelProperty(value = "投放开始时间")
+    private String beginTime;
+    /**
+     * 投放结束时间
+     */
+    @Excel(name = "投放结束时间", width = 15)
+    @ApiModelProperty(value = "投放结束时间")
+    private String endTime;
+    /**
+     * 投放时段
+     */
+    @Excel(name = "投放时段", width = 15)
+    @ApiModelProperty(value = "投放时段")
+    private String scheduleTime;
+    /**
+     * 1 - 轮播;2 - 优选
+     */
+    @Excel(name = "1 - 轮播;2 - 优选", width = 15)
+    @ApiModelProperty(value = "1 - 轮播;2 - 优选")
+    private Integer showMode;
+    /**
+     * 出价类型
+     */
+    @Excel(name = "出价类型", width = 15)
+    @ApiModelProperty(value = "出价类型")
+    private Integer bidType;
+    /**
+     * 出价
+     */
+    @Excel(name = "出价", width = 15)
+    @ApiModelProperty(value = "出价")
+    private Integer bid;
+    /**
+     * OCPX行为类型   1: CPM, 2: CPC,
+     */
+    @Excel(name = "OCPX行为类型   1: CPM, 2: CPC,", width = 15)
+    @ApiModelProperty(value = "OCPX行为类型   1: CPM, 2: CPC,")
+    private Integer ocpxActionType;
+    /**
+     * 深度转化目标 3: 付费,7: 次日留存,10: 完件, 11: 授信 ,0:无
+     */
+    @Excel(name = "深度转化目标 3: 付费,7: 次日留存,10: 完件, 11: 授信 ,0:无", width = 15)
+    @ApiModelProperty(value = "深度转化目标 3: 付费,7: 次日留存,10: 完件, 11: 授信 ,0:无")
+    private Integer deepConversionType;
+    /**
+     * 深度转化目标出价
+     */
+    @Excel(name = "深度转化目标出价", width = 15)
+    @ApiModelProperty(value = "深度转化目标出价")
+    private Integer deepConversionBid;
+    /**
+     * 出价最小值
+     */
+    @Excel(name = "出价最小值", width = 15)
+    @ApiModelProperty(value = "出价最小值")
+    private Integer bidMin;
+    /**
+     * 出价最大值
+     */
+    @Excel(name = "出价最大值", width = 15)
+    @ApiModelProperty(value = "出价最大值")
+    private Integer bidMax;
+    /**
+     * 1:固定出价 2:随机出价 值为1时取bid或cpa_bid  2 区 bid_max  bid_min
+     */
+    @Excel(name = "1:固定出价 2:随机出价 值为1时取bid或cpa_bid  2 区 bid_max  bid_min", width = 15)
+    @ApiModelProperty(value = "1:固定出价 2:随机出价 值为1时取bid或cpa_bid  2 区 bid_max  bid_min")
+    private Integer templateBidType;
+    /**
+     * 创建时间
+     */
+    @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;
+}

+ 15 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouBatchCampaignTemplateMapper.java

@@ -0,0 +1,15 @@
+package cn.com.ctop.kuaishou.modules.batch.mapper;
+
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCampaignTemplate;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 计划模板
+ *
+ * @author: jeecg-boot
+ * @date: 2021-01-19
+ * @cersion: V1.0
+ */
+public interface KuaiShouBatchCampaignTemplateMapper extends BaseMapper<KuaiShouBatchCampaignTemplate> {
+
+}

+ 15 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouBatchCreativeTemplateMapper.java

@@ -0,0 +1,15 @@
+package cn.com.ctop.kuaishou.modules.batch.mapper;
+
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCreativeTemplate;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 创意模板
+ *
+ * @author: jeecg-boot
+ * @date: 2021-01-19
+ * @cersion: V1.0
+ */
+public interface KuaiShouBatchCreativeTemplateMapper extends BaseMapper<KuaiShouBatchCreativeTemplate> {
+
+}

+ 15 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/KuaiShouBatchGroupTemplateMapper.java

@@ -0,0 +1,15 @@
+package cn.com.ctop.kuaishou.modules.batch.mapper;
+
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchGroupTemplate;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 创意模板
+ *
+ * @author: jeecg-boot
+ * @date: 2021-01-19
+ * @cersion: V1.0
+ */
+public interface KuaiShouBatchGroupTemplateMapper extends BaseMapper<KuaiShouBatchGroupTemplate> {
+
+}

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

@@ -20,4 +20,8 @@ public interface KuaishouVideoRelateCreativesMapper extends BaseMapper<KuaishouV
     void insertBatch(@Param(value = "videolist") List<KuaishouVideoRelateCreatives> videolist);
 
     List<JSONObject> getVideoListByMap(Map<String, Object> requestMap);
+
+    List<JSONObject> getVideoZeroListByMap(Map<String, Object> requestMap);
+
+    List<JSONObject> getHistoryTopVideoList(Map<String, Object> requestMap);
 }

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

@@ -0,0 +1,5 @@
+<?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.batch.mapper.KuaiShouBatchCampaignTemplateMapper">
+
+</mapper>

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

@@ -0,0 +1,5 @@
+<?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.batch.mapper.KuaiShouBatchCreativeTemplateMapper">
+
+</mapper>

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

@@ -0,0 +1,5 @@
+<?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.batch.mapper.KuaiShouBatchGroupTemplateMapper">
+
+</mapper>

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

@@ -49,4 +49,59 @@
         </if>
         ORDER BY t1.id ASC LIMIT #{num}
     </select>
+
+    <select id="getVideoZeroListByMap" resultType="com.alibaba.fastjson.JSONObject">
+        select
+        photo_id as 'photo_id',
+        stat_date as 'stat_date',
+        creative_count as 'creative_count'
+        FROM ctop_kuaishou_video_relate_creatives
+        where 1 = 1
+        <if test="accountId != null and accountId != '' ">
+            and account_id = #{accountId}
+        </if>
+        <if test="creativeCount != null and creativeCount != '' ">
+            AND creative_count = #{creativeCount}
+        </if>
+        ORDER BY stat_date ASC
+        LIMIT #{videoCnt}
+    </select>
+
+    <select id="getHistoryTopVideoList" resultType="com.alibaba.fastjson.JSONObject">
+        SELECT
+        t2.photo_id,
+        t2.signature,
+        t1.charge,
+        t2.channel_type,
+        t2.url as 'video_url'
+        FROM
+        (
+        SELECT
+        sum(charge) as 'charge',
+        signature
+        FROM
+        ctop_kuaishou_report_daily_material
+        WHERE
+        signature IN (
+        SELECT DISTINCT
+        (signature)
+        FROM
+        ctop_kuaishou_video_get
+        WHERE
+        account_id = #{accountId}
+        and stat_date &gt;= #{startDate}
+        and stat_date &lt;= #{endDate}
+        and signature is  not  null
+        )
+        GROUP BY
+        signature
+        ORDER BY
+        sum(charge) DESC
+        LIMIT #{num}
+        ) t1
+        LEFT   JOIN ctop_kuaishou_video_get t2 ON t1.signature = t2.signature
+        AND t2.account_id = #{accountId}
+        GROUP BY t2.signature
+        ORDER BY t1.charge DESC
+    </select>
 </mapper>

+ 14 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouBatchCampaignTemplateService.java

@@ -0,0 +1,14 @@
+package cn.com.ctop.kuaishou.modules.batch.service;
+
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCampaignTemplate;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 计划模板
+ * @Author: jeecg-boot
+ * @Date: 2021-01-19
+ * @Version: V1.0
+ */
+public interface IKuaiShouBatchCampaignTemplateService extends IService<KuaiShouBatchCampaignTemplate> {
+
+}

+ 14 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouBatchCreativeTemplateService.java

@@ -0,0 +1,14 @@
+package cn.com.ctop.kuaishou.modules.batch.service;
+
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCreativeTemplate;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 创意模板
+ * @Author: jeecg-boot
+ * @Date: 2021-01-19
+ * @Version: V1.0
+ */
+public interface IKuaiShouBatchCreativeTemplateService extends IService<KuaiShouBatchCreativeTemplate> {
+
+}

+ 14 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouBatchGroupTemplateService.java

@@ -0,0 +1,14 @@
+package cn.com.ctop.kuaishou.modules.batch.service;
+
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchGroupTemplate;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 创意模板
+ * @Author: jeecg-boot
+ * @Date: 2021-01-19
+ * @Version: V1.0
+ */
+public interface IKuaiShouBatchGroupTemplateService extends IService<KuaiShouBatchGroupTemplate> {
+
+}

+ 4 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaishouVideoRelateCreativesService.java

@@ -24,4 +24,8 @@ public interface IKuaishouVideoRelateCreativesService extends IService<KuaishouV
     List<JSONObject> getVideoListByMap(Map<String, Object> requestMap);
 
     List<KuaishouVideoRelateCreatives> listByParams(Long accountId);
+
+    List<JSONObject> getVideoZeroListByMap(Map<String, Object> requestMap);
+
+    List<JSONObject> getHistoryTopVideoList(Map<String, Object> requestMap);
 }

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

@@ -0,0 +1,19 @@
+package cn.com.ctop.kuaishou.modules.batch.service.impl;
+
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCampaignTemplate;
+import cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouBatchCampaignTemplateMapper;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchCampaignTemplateService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * 计划模板
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2021-01-19
+ */
+@Service
+public class KuaiShouBatchCampaignTemplateServiceImpl extends ServiceImpl<KuaiShouBatchCampaignTemplateMapper, KuaiShouBatchCampaignTemplate> implements IKuaiShouBatchCampaignTemplateService {
+
+}

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

@@ -0,0 +1,19 @@
+package cn.com.ctop.kuaishou.modules.batch.service.impl;
+
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCreativeTemplate;
+import cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouBatchCreativeTemplateMapper;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchCreativeTemplateService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * 创意模板
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2021-01-19
+ */
+@Service
+public class KuaiShouBatchCreativeTemplateServiceImpl extends ServiceImpl<KuaiShouBatchCreativeTemplateMapper, KuaiShouBatchCreativeTemplate> implements IKuaiShouBatchCreativeTemplateService {
+
+}

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

@@ -0,0 +1,19 @@
+package cn.com.ctop.kuaishou.modules.batch.service.impl;
+
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchGroupTemplate;
+import cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouBatchGroupTemplateMapper;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchGroupTemplateService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * 创意模板
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2021-01-19
+ */
+@Service
+public class KuaiShouBatchGroupTemplateServiceImpl extends ServiceImpl<KuaiShouBatchGroupTemplateMapper, KuaiShouBatchGroupTemplate> implements IKuaiShouBatchGroupTemplateService {
+
+}

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

@@ -24,6 +24,7 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.*;
 
 /**
  * 频库-视频关联创意数查询
@@ -159,4 +160,14 @@ public class KuaishouVideoRelateCreativesServiceImpl extends ServiceImpl<Kuaisho
         queryWrapper.last("limit 10");
         return this.list(queryWrapper);
     }
+
+    @Override
+    public List<JSONObject> getVideoZeroListByMap(Map<String, Object> requestMap) {
+        return kuaishouVideoRelateCreativesMapper.getVideoZeroListByMap(requestMap);
+    }
+
+    @Override
+    public List<JSONObject> getHistoryTopVideoList(Map<String, Object> requestMap) {
+        return kuaishouVideoRelateCreativesMapper.getHistoryTopVideoList(requestMap);
+    }
 }