Ver código fonte

整理代码,修改日志打印效果

syh 5 anos atrás
pai
commit
44381882d6
44 arquivos alterados com 1037 adições e 668 exclusões
  1. 1 1
      .gitignore
  2. 10 0
      jeecg-boot-base-common/src/main/java/org/jeecg/common/constant/CtopAdConstant.java
  3. 2 0
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/StatusCode.java
  4. 4 8
      jeecg-boot-module-system/pom.xml
  5. 0 5
      jeecg-boot-module-system/src/main/java/org/jeecg/JeecgApplication.java
  6. 253 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/SourceFileController.java
  7. 60 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/SourceFile.java
  8. 17 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/SourceFileMapper.java
  9. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/xml/SourceFileMapper.xml
  10. 2 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IFileInfoService.java
  11. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/ISourceFileService.java
  12. 3 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountAuthServiceImpl.java
  13. 3 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountLoginServiceImpl.java
  14. 15 18
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceAdvertisePlanServiceImpl.java
  15. 44 53
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceAdvertiserDataServiceImpl.java
  16. 0 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceBudgetTemplateServiceImpl.java
  17. 15 18
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceCampaignTemplateServiceImpl.java
  18. 13 18
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceCreativeServiceImpl.java
  19. 2 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceUserOrientationTemplateServiceImpl.java
  20. 16 16
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceAdvertisePlanTemplateServiceImpl.java
  21. 2 9
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceDeliveryTargetTemplateServiceImpl.java
  22. 7 14
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/CTopOauthTokenServiceImpl.java
  23. 5 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/CreateInternalServiceImpl.java
  24. 44 40
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/FileInfoServiceImpl.java
  25. 9 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/RefreshTokenServiceImpl.java
  26. 15 57
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ReportServiceImpl.java
  27. 19 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/SourceFileServiceImpl.java
  28. 162 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/SourceFileList.vue
  29. 128 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/SourceFileModal.vue
  30. 135 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/SourceFileModal__Style#Drawer.vue
  31. 23 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/fileupload/controller/FileController.java
  32. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/fileupload/service/impl/UploadServiceImpl.java
  33. 1 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/shiro/authc/ShiroRealm.java
  34. 1 1
      jeecg-boot-module-system/src/main/resources/application-dev.yml
  35. 2 2
      jeecg-boot-module-system/src/main/resources/jeecg/jeecg_database.properties
  36. 4 0
      jeecg-boot-module-system/src/main/resources/log4j.properties
  37. 0 96
      jeecg-boot-module-system/src/main/resources/logback-spring.xml
  38. 0 46
      module-common/pom.xml
  39. 0 43
      module-crawler/pom.xml
  40. 0 43
      module-kuaishou/pom.xml
  41. 0 46
      module-media/pom.xml
  42. 0 46
      module-report/pom.xml
  43. 0 43
      module-toutiao/pom.xml
  44. 1 7
      pom.xml

+ 1 - 1
.gitignore

@@ -32,4 +32,4 @@ gen
 # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
 hs_err_pid*
 **/target/
-application.yml
+#application.yml

+ 10 - 0
jeecg-boot-base-common/src/main/java/org/jeecg/common/constant/CtopAdConstant.java

@@ -0,0 +1,10 @@
+package org.jeecg.common.constant;
+
+/**
+ * 广告相关常量数据
+ */
+public class CtopAdConstant {
+    public static final String PLATFORM_TYPE_BYTEDANCE = "1";
+    public static final String PLATFORM_TYPE_KUAISHOU = "2";
+
+}

+ 2 - 0
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/StatusCode.java

@@ -21,6 +21,8 @@ public enum StatusCode {
     BYTEDANCE_IMAGE_UPLOAD_FAIL("今日头条图片文件上传失败", -203, false),
     TEMPLATE_NAME_HAS_EXIST("模板名称已存在", -204, false),
     TEMPLATE_NAME_IS_NULL("模板名称为空", -205, false),
+    FILE_HAS_NOT_UPLOAD("文件尚未上传", -206, false),
+    FILE_HAS_UPLOAD("文件已经上传过", 0, false),
     COMMON_SERVER_ERROR("服务器内部错误", -102, false);
     private String desc;
     private int code;

+ 4 - 8
jeecg-boot-module-system/pom.xml

@@ -36,6 +36,10 @@
             <artifactId>jeecg-boot-base-common</artifactId>
             <version>2.0.2</version>
         </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+        </dependency>
 
         <dependency>
             <groupId>cn.com.ctop</groupId>
@@ -72,14 +76,6 @@
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <configuration>
-                    <delimiters>@</delimiters>
-                    <useDefaultDelimiters>false</useDefaultDelimiters>
-                </configuration>
-            </plugin>
         </plugins>
         <resources>
             <!-- 解决MyBatis配置文件引入问题 -->

+ 0 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/JeecgApplication.java

@@ -1,8 +1,6 @@
 package org.jeecg;
 
 import lombok.extern.slf4j.Slf4j;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -27,13 +25,10 @@ import java.net.UnknownHostException;
 
 
 public class JeecgApplication {
-    Logger logger = LoggerFactory.getLogger(JeecgApplication.class);
     public static void main(String[] args) throws UnknownHostException {
         ConfigurableApplicationContext application = SpringApplication.run(JeecgApplication.class, args);
         Environment env = application.getEnvironment();
         String ip = InetAddress.getLocalHost().getHostAddress();
-
-
         String port = env.getProperty("server.port");
         String path = env.getProperty("server.servlet.context-path");
         log.info("\n----------------------------------------------------------\n\t" +

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

@@ -0,0 +1,253 @@
+package org.jeecg.modules.ctop.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.ctop.entity.SourceFile;
+import org.jeecg.modules.ctop.service.ISourceFileService;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+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 com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * @Description: 统一资源库文件信息
+ * @Author: jeecg-boot
+ * @Date: 2019-09-02
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags = "统一资源库文件信息")
+@RestController
+@RequestMapping("/ctop/sourceFile")
+public class SourceFileController {
+    @Autowired
+    private ISourceFileService sourceFileService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param sourceFile
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "统一资源库文件信息-分页列表查询")
+    @ApiOperation(value = "统一资源库文件信息-分页列表查询", notes = "统一资源库文件信息-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<SourceFile>> queryPageList(SourceFile sourceFile,
+                                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                   HttpServletRequest req) {
+        Result<IPage<SourceFile>> result = new Result<IPage<SourceFile>>();
+        QueryWrapper<SourceFile> queryWrapper = QueryGenerator.initQueryWrapper(sourceFile, req.getParameterMap());
+        Page<SourceFile> page = new Page<SourceFile>(pageNo, pageSize);
+        IPage<SourceFile> pageList = sourceFileService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param sourceFile
+     * @return
+     */
+    @AutoLog(value = "统一资源库文件信息-添加")
+    @ApiOperation(value = "统一资源库文件信息-添加", notes = "统一资源库文件信息-添加")
+    @PostMapping(value = "/add")
+    public Result<SourceFile> add(@RequestBody SourceFile sourceFile) {
+        Result<SourceFile> result = new Result<SourceFile>();
+        try {
+            sourceFileService.save(sourceFile);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param sourceFile
+     * @return
+     */
+    @AutoLog(value = "统一资源库文件信息-编辑")
+    @ApiOperation(value = "统一资源库文件信息-编辑", notes = "统一资源库文件信息-编辑")
+    @PutMapping(value = "/edit")
+    public Result<SourceFile> edit(@RequestBody SourceFile sourceFile) {
+        Result<SourceFile> result = new Result<SourceFile>();
+        SourceFile sourceFileEntity = sourceFileService.getById(sourceFile.getId());
+        if (sourceFileEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = sourceFileService.updateById(sourceFile);
+            //TODO 返回false说明什么?
+            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 {
+            sourceFileService.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<SourceFile> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<SourceFile> result = new Result<SourceFile>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.sourceFileService.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<SourceFile> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<SourceFile> result = new Result<SourceFile>();
+        SourceFile sourceFile = sourceFileService.getById(id);
+        if (sourceFile == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(sourceFile);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<SourceFile> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                SourceFile sourceFile = JSON.parseObject(deString, SourceFile.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(sourceFile, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<SourceFile> pageList = sourceFileService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "统一资源库文件信息列表");
+        mv.addObject(NormalExcelConstants.CLASS, SourceFile.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<SourceFile> listSourceFiles = ExcelImportUtil.importExcel(file.getInputStream(), SourceFile.class, params);
+                sourceFileService.saveBatch(listSourceFiles);
+                return Result.ok("文件导入成功!数据行数:" + listSourceFiles.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("文件导入失败!");
+    }
+
+}

+ 60 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/SourceFile.java

@@ -0,0 +1,60 @@
+package org.jeecg.modules.ctop.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+/**
+ * @Description: 统一资源库文件信息
+ * @Author: jeecg-boot
+ * @Date: 2019-09-02
+ * @Version: V1.0
+ */
+@Data
+@TableName("ctop_source_file")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_source_file对象", description = "统一资源库文件信息")
+public class SourceFile {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+    /**
+     * MD5code码(唯一性校验)
+     */
+    @Excel(name = "MD5code码(唯一性校验)", width = 15)
+    @ApiModelProperty(value = "MD5code码(唯一性校验)")
+    private String code;
+    /**
+     * url
+     */
+    @Excel(name = "url", width = 15)
+    @ApiModelProperty(value = "url")
+    private String url;
+    /**
+     * createTime
+     */
+    @ApiModelProperty(value = "createTime")
+    private Date createTime;
+    /**
+     * updateTime
+     */
+    @ApiModelProperty(value = "updateTime")
+    private Date updateTime;
+}

+ 17 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/SourceFileMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.ctop.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.ctop.entity.SourceFile;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 统一资源库文件信息
+ * @Author: jeecg-boot
+ * @Date: 2019-09-02
+ * @Version: V1.0
+ */
+public interface SourceFileMapper extends BaseMapper<SourceFile> {
+
+}

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/xml/SourceFileMapper.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="org.jeecg.modules.ctop.mapper.SourceFileMapper">
+
+</mapper>

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IFileInfoService.java

@@ -28,4 +28,6 @@ public interface IFileInfoService extends IService<FileInfo> {
     JSONArray getByteDanceIndustryList(HttpServletRequest req);
 
     List<FileInfo> getFileInfoByMd5(String md5);
+
+    Map<String, Object> checkFile(String code);
 }

+ 14 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/ISourceFileService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.ctop.service;
+
+import org.jeecg.modules.ctop.entity.SourceFile;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 统一资源库文件信息
+ * @Author: jeecg-boot
+ * @Date: 2019-09-02
+ * @Version: V1.0
+ */
+public interface ISourceFileService extends IService<SourceFile> {
+
+}

+ 3 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountAuthServiceImpl.java

@@ -4,11 +4,10 @@ import cn.com.ctop.common.utils.PropertiesUtils;
 import cn.com.ctop.toutiao.common.BytedanceInterfaceConstant;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import constant.KuaishouInterfaceConstant;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.modules.ctop.entity.BindAccountAuth;
 import org.jeecg.modules.ctop.mapper.BindAccountAuthMapper;
 import org.jeecg.modules.ctop.service.IBindAccountAuthService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -24,10 +23,9 @@ import java.util.Map;
  * @Date: 2019-07-31
  * @Version: V1.0
  */
+@Slf4j
 @Service
 public class BindAccountAuthServiceImpl extends ServiceImpl<BindAccountAuthMapper, BindAccountAuth> implements IBindAccountAuthService {
-    private static final Logger logger = LoggerFactory.getLogger(BindAccountAuthServiceImpl.class);
-
     @Autowired
     private BindAccountAuthMapper bindAccountAuthMapper;
 
@@ -53,7 +51,7 @@ public class BindAccountAuthServiceImpl extends ServiceImpl<BindAccountAuthMappe
         bindAccount.setAuthType(authType);
         int i = bindAccountAuthMapper.insert(bindAccount);
         if (i > 0) {
-            logger.info("授权账号绑定成功,本地id:{},accountId:{}", bindAccount.getAdvertiserId(), accountId);
+            log.info("授权账号绑定成功,本地id:{},accountId:{}", bindAccount.getAdvertiserId(), accountId);
         }
     }
 

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountLoginServiceImpl.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.ctop.service.impl;
 
 import cn.com.ctop.common.utils.Check;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.modules.ctop.entity.BindAccountLogin;
 import org.jeecg.modules.ctop.mapper.BindAccountLoginMapper;
 import org.jeecg.modules.ctop.service.IBindAccountLoginService;
@@ -20,10 +21,9 @@ import java.util.Map;
  * @Date: 2019-07-31
  * @Version: V1.0
  */
+@Slf4j
 @Service
 public class BindAccountLoginServiceImpl extends ServiceImpl<BindAccountLoginMapper, BindAccountLogin> implements IBindAccountLoginService {
-    private static final Logger logger = LoggerFactory.getLogger(BindAccountLoginServiceImpl.class);
-
     @Autowired
     private BindAccountLoginMapper bindAccountLoginMapper;
 
@@ -44,7 +44,7 @@ public class BindAccountLoginServiceImpl extends ServiceImpl<BindAccountLoginMap
         bindAccountLogin.setLoginType(loginType);
         int i = bindAccountLoginMapper.insert(bindAccountLogin);
         if (i > 0) {
-            logger.info("登录账号绑定成功,广告主id:{}", bindAccountLogin.getAdvertiserId());
+            log.info("登录账号绑定成功,广告主id:{}", bindAccountLogin.getAdvertiserId());
             return true;
         }
 

+ 15 - 18
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceAdvertisePlanServiceImpl.java

@@ -2,6 +2,8 @@ package org.jeecg.modules.ctop.service.impl;
 
 import cn.com.ctop.common.utils.PropertiesUtils;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
@@ -19,13 +21,9 @@ import org.jeecg.modules.ctop.mapper.BytedanceDeliveryTargetTemplateMapper;
 import org.jeecg.modules.ctop.mapper.BytedanceUrlInfoMapper;
 import org.jeecg.modules.ctop.service.IByteDanceAdvertisePlanService;
 import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -39,9 +37,20 @@ import java.util.Map;
  * @Date: 2019-07-22
  * @Version: V1.0
  */
+@Slf4j
 @Service
 public class ByteDanceAdvertisePlanServiceImpl extends ServiceImpl<ByteDanceAdvertisePlanMapper, ByteDanceAdvertisePlan> implements IByteDanceAdvertisePlanService {
-    private static final Logger logger = LoggerFactory.getLogger(ByteDanceAdvertisePlanServiceImpl.class);
+    @Autowired
+    private BytedanceUrlInfoMapper urlInfoMapper;
+
+    @Autowired
+    private BytedanceDeliveryTargetTemplateMapper deliveryTargetTemplateMapper;
+
+    @Autowired
+    private ICTopOauthTokenService tokenService;
+
+    @Autowired
+    private ByteDanceAdvertisePlanMapper planMapper;
 
     @Override
     public Map<String, Object> advertiserPlanCreate(CTopOauthToken token, Long campaignId, String dataString) {
@@ -53,7 +62,7 @@ public class ByteDanceAdvertisePlanServiceImpl extends ServiceImpl<ByteDanceAdve
         Integer code = result.getInteger("code");
         String message = result.getString("message");
         if (null == code || code != 0) {
-            logger.info("广告计划创建失败,广告主id:{},message:{}", token.getAdvertiserId(), message);
+            log.info("广告计划创建失败,广告主id:{},message:{}", token.getAdvertiserId(), message);
             resultMap.put("code", -1);
             resultMap.put("message", message);
             return resultMap;
@@ -145,13 +154,6 @@ public class ByteDanceAdvertisePlanServiceImpl extends ServiceImpl<ByteDanceAdve
         }
         return null;
     }
-
-    @Autowired
-    private BytedanceUrlInfoMapper urlInfoMapper;
-
-    @Autowired
-    private BytedanceDeliveryTargetTemplateMapper deliveryTargetTemplateMapper;
-
     public JSONObject getAdConvert(CTopOauthToken token, BytedanceDeliveryTargetTemplate targetTemplate) {
         String accessToken = token.getAccessToken();
         final Long advertiserId = token.getAccountId();
@@ -224,8 +226,6 @@ public class ByteDanceAdvertisePlanServiceImpl extends ServiceImpl<ByteDanceAdve
         return null;
     }
 
-    @Autowired
-    private ByteDanceAdvertisePlanMapper planMapper;
 
     public JSONObject createAd(JSONObject data, String token) {
         // 请求地址
@@ -268,7 +268,4 @@ public class ByteDanceAdvertisePlanServiceImpl extends ServiceImpl<ByteDanceAdve
         }
         return null;
     }
-
-    @Autowired
-    private ICTopOauthTokenService tokenService;
 }

+ 44 - 53
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceAdvertiserDataServiceImpl.java

@@ -4,12 +4,11 @@ import cn.com.ctop.common.utils.HttpUtils;
 import cn.com.ctop.common.utils.PropertiesUtils;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.modules.ctop.entity.*;
 import org.jeecg.modules.ctop.mapper.*;
 import org.jeecg.modules.ctop.service.IByteDanceAdvertiserDataService;
 import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -21,12 +20,28 @@ import java.util.TreeMap;
 /**
  * @author 宋英豪
  */
+@Slf4j
 @Service
 public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserDataService {
-    private static final Logger logger = LoggerFactory.getLogger(ByteDanceAdvertiserDataServiceImpl.class);
-
     @Autowired
     private ICTopOauthTokenService tokenService;
+    @Autowired
+    private ByteDanceAdvertisePlanMapper advertisePlanMapper;
+    @Autowired
+    private ByteDanceCampaignTemplateMapper campaignTemplateMapper;
+    @Autowired
+    private ByteDanceCustomAudienceMapper audienceMapper;
+    @Autowired
+    private ByteDanceCreativeMaterialMapper creativeMaterialMapper;
+    @Autowired
+    private ByteDanceCreativeMapper creativeMapper;
+    @Autowired
+    private ByteDanceAdvertiserBudgetMapper advertiserBudgetMapper;
+    @Autowired
+    private ByteDanceCampaignMapper campaignMapper;
+    @Autowired
+    private ByteDanceAdvertiserMapper advertiserMapper;
+
     @Override
     public Map<String, Object> getAdvertiserInfo(String accountId) {
         Map<String, Object> resultMap = new HashMap<>();
@@ -44,7 +59,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("获取广告主信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("获取广告主信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("success", false);
             resultMap.put("code", -1);
             resultMap.put("message", "获取广告主信息接口异常");
@@ -99,12 +114,12 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.error("获取广告计划信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.error("获取广告计划信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             return;
         }
         JSONArray data = jsonObject.getJSONObject("data").getJSONArray("list");
         if (null == data || data.size() <= 0) {
-            logger.error("获取广告计划信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.error("获取广告计划信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             return;
         }
         for (int i = 0; i < data.size(); i++) {
@@ -117,9 +132,6 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         getAdvertiserPlanByPageNumber(accountId, pageNumber + 1, ids);
     }
 
-    @Autowired
-    private ByteDanceAdvertisePlanMapper advertisePlanMapper;
-
     @Override
     public Map<String, Object> getAdvertiserPlan(String accountId, String ids) {
         getAdvertiserPlanByPageNumber(accountId, 1, ids);
@@ -155,14 +167,14 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("获取广告预算信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("获取广告预算信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "获取广告预算信息接口异常");
             return resultMap;
         }
         JSONArray data = jsonObject.getJSONArray("data");
         if (null == data || data.size() <= 0) {
-            logger.info("广告主预算信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("广告主预算信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", 0);
             resultMap.put("message", "获取广告主预算信息完成");
             return resultMap;
@@ -206,14 +218,14 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("获取广告主创意素材信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("获取广告主创意素材信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "获取广告主创意素材信息接口异常");
             return resultMap;
         }
         JSONArray data = jsonObject.getJSONArray("data");
         if (null == data || data.size() <= 0) {
-            logger.info("广告主创意素材信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("广告主创意素材信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", 0);
             resultMap.put("message", "获取广告主预算信息完成");
             return resultMap;
@@ -256,14 +268,14 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("广告组更新状态接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("广告组更新状态接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "广告组更新状态接口异常");
             return resultMap;
         }
         JSONObject data = jsonObject.getJSONObject("data");
         if (null == data) {
-            logger.info("广告组更新状态异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("广告组更新状态异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "广告组更新状态异常");
             return resultMap;
@@ -314,14 +326,14 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("广告组更新接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("广告组更新接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "广告组更新接口异常");
             return resultMap;
         }
         JSONObject data = jsonObject.getJSONObject("data");
         if (null == data) {
-            logger.info("广告组更新异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("广告组更新异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "广告组更新异常");
             return resultMap;
@@ -369,14 +381,14 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.error("广告计划更新状态接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.error("广告计划更新状态接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "广告计划更新状态接口异常");
             return resultMap;
         }
         JSONObject data = jsonObject.getJSONObject("data");
         if (null == data) {
-            logger.info("广告计划更新状态异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("广告计划更新状态异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "广告计划更新状态异常");
             return resultMap;
@@ -423,14 +435,14 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("修改计划出价接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("修改计划出价接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "修改计划出价接口异常");
             return resultMap;
         }
         JSONObject getData = jsonObject.getJSONObject("data");
         if (null == getData) {
-            logger.info("修改计划出价异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("修改计划出价异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "修改计划出价异常");
             return resultMap;
@@ -476,14 +488,14 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         JSONObject jsonObject = JSONObject.parseObject(result);
         Integer code = jsonObject.getInteger("code");
         if (null == code || !code.equals(0)) {
-            logger.info("修改计划预算接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("修改计划预算接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "修改计划预算接口异常");
             return resultMap;
         }
         JSONObject getData = jsonObject.getJSONObject("data");
         if (null == getData) {
-            logger.info("修改计划预算异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("修改计划预算异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "修改计划预算异常");
             return resultMap;
@@ -524,14 +536,14 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("修改创意状态接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("修改创意状态接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "修改创意状态接口异常");
             return resultMap;
         }
         JSONObject data = jsonObject.getJSONObject("data");
         if (null == data) {
-            logger.info("修改创意状态异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("修改创意状态异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "修改创意状态异常");
             return resultMap;
@@ -571,7 +583,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("获取人群包信息接口异常==》accountId:{},message:{}", token.getAdvertiserId(), jsonObject.getString("message"));
+            log.info("获取人群包信息接口异常==》accountId:{},message:{}", token.getAdvertiserId(), jsonObject.getString("message"));
             resultMap.put("success", false);
             resultMap.put("message", "获取人群包信息接口异常");
             resultMap.put("code", -1);
@@ -579,7 +591,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         }
         JSONArray data = jsonObject.getJSONObject("data").getJSONArray("custom_audience_list");
         if (null == data || data.size() <= 0) {
-            logger.info("人群包信息不存在==》accountId:{},message:{}", token.getAdvertiserId(), jsonObject.getString("message"));
+            log.info("人群包信息不存在==》accountId:{},message:{}", token.getAdvertiserId(), jsonObject.getString("message"));
             resultMap.put("success", false);
             resultMap.put("message", "人群包信息不存在");
             resultMap.put("code", -1);
@@ -598,16 +610,6 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         return resultMap;
     }
 
-    @Autowired
-    private ByteDanceCampaignTemplateMapper campaignTemplateMapper;
-
-
-    @Autowired
-    private ByteDanceCustomAudienceMapper audienceMapper;
-
-    @Autowired
-    private ByteDanceCreativeMaterialMapper creativeMaterialMapper;
-
     private void getAdvertiserCreativeByPageNumber(String accountId, Integer pageNumber, String ids) {
         CTopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
         //2: 根据token以及用户id获取用户信息数据
@@ -635,12 +637,12 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("获取广告主广告创意信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("获取广告主广告创意信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             return;
         }
         JSONArray data = jsonObject.getJSONObject("data").getJSONArray("list");
         if (null == data || data.size() <= 0) {
-            logger.info("广告主广告创意信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.info("广告主广告创意信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             return;
         }
         for (int i = 0; i < data.size(); i++) {
@@ -653,11 +655,6 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         getAdvertiserCreativeByPageNumber(accountId, pageNumber + 1, ids);
     }
 
-    @Autowired
-    private ByteDanceCreativeMapper creativeMapper;
-    @Autowired
-    private ByteDanceAdvertiserBudgetMapper advertiserBudgetMapper;
-
     private void getAdvertiserCampaignByPageNumber(String accountId, Integer pageNumber, String ids) {
         CTopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
         //2: 根据token以及用户id获取用户信息数据
@@ -685,12 +682,12 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         Integer code = jsonObject.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.error("获取广告组信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.error("获取广告组信息接口异常==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             return;
         }
         JSONArray data = jsonObject.getJSONObject("data").getJSONArray("list");
         if (null == data || data.size() <= 0) {
-            logger.error("获取广告组信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
+            log.error("获取广告组信息不存在==》accountId:{},message:{}", accountId, jsonObject.getString("message"));
             return;
         }
         for (int i = 0; i < data.size(); i++) {
@@ -702,10 +699,4 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         }
         getAdvertiserCampaignByPageNumber(accountId, pageNumber + 1, ids);
     }
-
-    @Autowired
-    private ByteDanceCampaignMapper campaignMapper;
-
-    @Autowired
-    private ByteDanceAdvertiserMapper advertiserMapper;
 }

+ 0 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceBudgetTemplateServiceImpl.java

@@ -13,8 +13,6 @@ import org.jeecg.common.util.StatusCode;
 import org.jeecg.modules.ctop.entity.ByteDanceBudgetTemplate;
 import org.jeecg.modules.ctop.mapper.ByteDanceBudgetTemplateMapper;
 import org.jeecg.modules.ctop.service.IByteDanceBudgetTemplateService;
-import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import javax.servlet.http.HttpServletRequest;
@@ -81,9 +79,4 @@ public class ByteDanceBudgetTemplateServiceImpl extends ServiceImpl<ByteDanceBud
         result.setResult(pageList);
         return result;
     }
-
-    @Autowired
-    private ICTopOauthTokenService tokenService;
-    @Autowired
-    private ByteDanceBudgetTemplateMapper budgetTemplateMapper;
 }

+ 15 - 18
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceCampaignTemplateServiceImpl.java

@@ -7,9 +7,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.entity.ContentType;
 import org.apache.http.entity.StringEntity;
@@ -28,8 +28,6 @@ import org.jeecg.modules.ctop.mapper.ByteDanceCampaignMapper;
 import org.jeecg.modules.ctop.mapper.ByteDanceCampaignTemplateMapper;
 import org.jeecg.modules.ctop.service.IByteDanceCampaignTemplateService;
 import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -37,7 +35,6 @@ import javax.servlet.http.HttpServletRequest;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
-import java.net.URI;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
@@ -49,9 +46,15 @@ import java.util.Map;
  * @Date: 2019-07-22
  * @Version: V1.0
  */
+@Slf4j
 @Service
 public class ByteDanceCampaignTemplateServiceImpl extends ServiceImpl<ByteDanceCampaignTemplateMapper, ByteDanceCampaignTemplate> implements IByteDanceCampaignTemplateService {
-    private static final Logger logger = LoggerFactory.getLogger(ByteDanceCampaignTemplateServiceImpl.class);
+    @Autowired
+    private ByteDanceCampaignTemplateMapper campaignTemplateMapper;
+    @Autowired
+    private ICTopOauthTokenService tokenService;
+    @Autowired
+    private ByteDanceCampaignMapper campaignMapper;
     @Override
     public Map<String, Object> insertTemplate(ByteDanceCampaignTemplate template) {
         Map<String, Object> resultMap = new HashMap<>();
@@ -81,6 +84,7 @@ public class ByteDanceCampaignTemplateServiceImpl extends ServiceImpl<ByteDanceC
         ResultMapUtils.setResultMap(resultMap, StatusCode.COMMON_SUCCESS.getCode());
         return resultMap;
     }
+
     @Override
     public Result<IPage<ByteDanceCampaignTemplate>> getList(ByteDanceCampaignTemplate template, Integer pageNo, Integer pageSize, HttpServletRequest req) {
         Result<IPage<ByteDanceCampaignTemplate>> result = new Result<>();
@@ -110,14 +114,14 @@ public class ByteDanceCampaignTemplateServiceImpl extends ServiceImpl<ByteDanceC
         Integer code = result.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("创建广告组接口异常==》accountId:{},message:{}", accountId, result.getString("message"));
+            log.info("创建广告组接口异常==》accountId:{},message:{}", accountId, result.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "创建广告组接口异常");
             return resultMap;
         }
         JSONObject data = result.getJSONObject("data");
         if (null == data) {
-            logger.info("广告组创建异常==》accountId:{},message:{}", accountId, result.getString("message"));
+            log.info("广告组创建异常==》accountId:{},message:{}", accountId, result.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "广告组创建异常");
             return resultMap;
@@ -164,14 +168,14 @@ public class ByteDanceCampaignTemplateServiceImpl extends ServiceImpl<ByteDanceC
         Integer code = result.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("创建广告组接口异常==》accountId:{},message:{}", token.getAccountId(), result.getString("message"));
+            log.info("创建广告组接口异常==》accountId:{},message:{}", token.getAccountId(), result.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", result.getString("message"));
             return resultMap;
         }
         JSONObject data = result.getJSONObject("data");
         if (null == data) {
-            logger.info("广告组创建异常==》accountId:{},message:{}", token.getAccountId(), result.getString("message"));
+            log.info("广告组创建异常==》accountId:{},message:{}", token.getAccountId(), result.getString("message"));
             resultMap.put("code", -1);
             resultMap.put("message", "广告组创建异常");
             return resultMap;
@@ -202,7 +206,7 @@ public class ByteDanceCampaignTemplateServiceImpl extends ServiceImpl<ByteDanceC
         Integer code = result.getInteger("code");
 
         if (null == code || !code.equals(0)) {
-            logger.info("创建广告组接口异常==》accountId:{},message:{}", token.getAccountId(), result.getString("message"));
+            log.info("创建广告组接口异常==》accountId:{},message:{}", token.getAccountId(), result.getString("message"));
             resultMap.put("success", false);
             resultMap.put("code", -1);
             resultMap.put("message", result.getString("message"));
@@ -210,7 +214,7 @@ public class ByteDanceCampaignTemplateServiceImpl extends ServiceImpl<ByteDanceC
         }
         JSONObject data = result.getJSONObject("data");
         if (null == data) {
-            logger.info("广告组创建异常==》accountId:{},message:{}", token.getAccountId(), result.getString("message"));
+            log.info("广告组创建异常==》accountId:{},message:{}", token.getAccountId(), result.getString("message"));
             resultMap.put("success", false);
             resultMap.put("code", -1);
             resultMap.put("message", "广告组创建异常");
@@ -267,11 +271,4 @@ public class ByteDanceCampaignTemplateServiceImpl extends ServiceImpl<ByteDanceC
         }
         return null;
     }
-
-    @Autowired
-    private ByteDanceCampaignTemplateMapper campaignTemplateMapper;
-    @Autowired
-    private ICTopOauthTokenService tokenService;
-    @Autowired
-    private ByteDanceCampaignMapper campaignMapper;
 }

+ 13 - 18
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceCreativeServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.common.utils.PropertiesUtils;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpPost;
@@ -17,8 +18,6 @@ import org.jeecg.modules.ctop.entity.ByteDanceCreative;
 import org.jeecg.modules.ctop.entity.CTopOauthToken;
 import org.jeecg.modules.ctop.mapper.ByteDanceCreativeMapper;
 import org.jeecg.modules.ctop.service.*;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -34,9 +33,19 @@ import java.util.Map;
  * @Date: 2019-07-22
  * @Version: V1.0
  */
+@Slf4j
 @Service
 public class ByteDanceCreativeServiceImpl extends ServiceImpl<ByteDanceCreativeMapper, ByteDanceCreative> implements IByteDanceCreativeService {
-    private static final Logger logger = LoggerFactory.getLogger(ByteDanceCreativeServiceImpl.class);
+    @Autowired
+    private IFileInfoService fileInfoService;
+    @Autowired
+    private IByteDanceCampaignTemplateService campaignTemplateService;
+    @Autowired
+    private IBytedanceAdvertisePlanTemplateService planTemplateService;
+    @Autowired
+    private IByteDanceAdvertiserDataService advertiserDataService;
+    @Autowired
+    private ICTopOauthTokenService tokenService;
 
     @Override
     public Map<String, Object> creativeCreate(String accountId, Long adId, String dataString) {
@@ -51,7 +60,7 @@ public class ByteDanceCreativeServiceImpl extends ServiceImpl<ByteDanceCreativeM
         Integer code = result.getInteger("code");
         String message = result.getString("message");
         if (null == code || code != 0) {
-            logger.info("广告创意创建失败,accountId:{},message:{}", accountId, message);
+            log.info("广告创意创建失败,accountId:{},message:{}", accountId, message);
             resultMap.put("success", false);
             resultMap.put("code", -1);
             resultMap.put("message", message);
@@ -64,12 +73,6 @@ public class ByteDanceCreativeServiceImpl extends ServiceImpl<ByteDanceCreativeM
         return resultMap;
     }
 
-    @Autowired
-    private IFileInfoService fileInfoService;
-    @Autowired
-    private IByteDanceCampaignTemplateService campaignTemplateService;
-    @Autowired
-    private IBytedanceAdvertisePlanTemplateService planTemplateService;
 
     @Override
     public Map<String, Object> insertBatch(JSONObject template) {
@@ -256,14 +259,9 @@ public class ByteDanceCreativeServiceImpl extends ServiceImpl<ByteDanceCreativeM
     }
 
 
-    @Autowired
-    private IByteDanceAdvertiserDataService advertiserDataService;
-
     public JSONObject createCreative(JSONObject data, String token) {
-
         // 构造请求
         String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_creative_create_v2");
-        // 构造请求
         HttpPost httpEntity = new HttpPost(url);
         httpEntity.setHeader("Access-Token", token);
         CloseableHttpResponse response = null;
@@ -299,7 +297,4 @@ public class ByteDanceCreativeServiceImpl extends ServiceImpl<ByteDanceCreativeM
         }
         return null;
     }
-
-    @Autowired
-    private ICTopOauthTokenService tokenService;
 }

+ 2 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceUserOrientationTemplateServiceImpl.java

@@ -11,7 +11,6 @@ import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.ctop.entity.ByteDanceUserOrientationTemplate;
 import org.jeecg.modules.ctop.mapper.ByteDanceUserOrientationTemplateMapper;
 import org.jeecg.modules.ctop.service.IByteDanceUserOrientationTemplateService;
-import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -27,6 +26,8 @@ import java.util.Map;
  */
 @Service
 public class ByteDanceUserOrientationTemplateServiceImpl extends ServiceImpl<ByteDanceUserOrientationTemplateMapper, ByteDanceUserOrientationTemplate> implements IByteDanceUserOrientationTemplateService {
+    @Autowired
+    private ByteDanceUserOrientationTemplateMapper templateMapper;
 
     @Override
     public Map<String, Object> insertTemplate(ByteDanceUserOrientationTemplate template) {
@@ -53,9 +54,4 @@ public class ByteDanceUserOrientationTemplateServiceImpl extends ServiceImpl<Byt
         result.setResult(pageList);
         return result;
     }
-
-    @Autowired
-    private ICTopOauthTokenService tokenService;
-    @Autowired
-    private ByteDanceUserOrientationTemplateMapper templateMapper;
 }

+ 16 - 16
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceAdvertisePlanTemplateServiceImpl.java

@@ -25,6 +25,22 @@ import java.util.Map;
 @Service
 public class BytedanceAdvertisePlanTemplateServiceImpl extends ServiceImpl<BytedanceAdvertisePlanTemplateMapper, BytedanceAdvertisePlanTemplate> implements IBytedanceAdvertisePlanTemplateService {
 
+    @Autowired
+    private ByteDanceCampaignMapper campaignMapper;
+    @Autowired
+    private ByteDanceBudgetTemplateMapper budgetTemplateMapper;
+    @Autowired
+    private BytedanceDeliveryTargetTemplateMapper deliveryTargetTemplateMapper;
+    @Autowired
+    private ByteDanceUserOrientationTemplateMapper userOrientationTemplateMapper;
+
+    @Autowired
+    private IByteDanceAdvertisePlanService advertisePlanService;
+    @Autowired
+    private BytedanceAdvertisePlanTemplateMapper templateMapper;
+    @Autowired
+    private ICTopOauthTokenService tokenService;
+
     @Override
     public Map<String, Object> insertTemplate(BytedanceAdvertisePlanTemplate template, String accountId) {
         Map<String, Object> resultMap = new HashMap<>();
@@ -108,20 +124,4 @@ public class BytedanceAdvertisePlanTemplateServiceImpl extends ServiceImpl<Byted
         data.put("name", getName + "_计划_" + System.currentTimeMillis());
         return advertisePlanService.advertiserPlanCreate(token, campaignId, data.toJSONString());
     }
-
-    @Autowired
-    private ByteDanceCampaignMapper campaignMapper;
-    @Autowired
-    private ByteDanceBudgetTemplateMapper budgetTemplateMapper;
-    @Autowired
-    private BytedanceDeliveryTargetTemplateMapper deliveryTargetTemplateMapper;
-    @Autowired
-    private ByteDanceUserOrientationTemplateMapper userOrientationTemplateMapper;
-
-    @Autowired
-    private IByteDanceAdvertisePlanService advertisePlanService;
-    @Autowired
-    private BytedanceAdvertisePlanTemplateMapper templateMapper;
-    @Autowired
-    private ICTopOauthTokenService tokenService;
 }

+ 2 - 9
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceDeliveryTargetTemplateServiceImpl.java

@@ -16,7 +16,6 @@ import org.jeecg.modules.ctop.entity.BytedanceUrlInfo;
 import org.jeecg.modules.ctop.mapper.BytedanceDeliveryTargetTemplateMapper;
 import org.jeecg.modules.ctop.mapper.BytedanceUrlInfoMapper;
 import org.jeecg.modules.ctop.service.IBytedanceDeliveryTargetTemplateService;
-import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -33,6 +32,8 @@ import java.util.Map;
  */
 @Service
 public class BytedanceDeliveryTargetTemplateServiceImpl extends ServiceImpl<BytedanceDeliveryTargetTemplateMapper, BytedanceDeliveryTargetTemplate> implements IBytedanceDeliveryTargetTemplateService {
+    @Autowired
+    BytedanceUrlInfoMapper urlInfoMapper;
 
     @Override
     public Map<String, Object> insertTemplate(BytedanceDeliveryTargetTemplate template) {
@@ -72,9 +73,6 @@ public class BytedanceDeliveryTargetTemplateServiceImpl extends ServiceImpl<Byte
         return resultMap;
     }
 
-    @Autowired
-    BytedanceUrlInfoMapper urlInfoMapper;
-
     @Override
     public Result<IPage<BytedanceDeliveryTargetTemplate>> getList(BytedanceDeliveryTargetTemplate template, Integer pageNo, Integer pageSize, HttpServletRequest req) {
         Result<IPage<BytedanceDeliveryTargetTemplate>> result = new Result<>();
@@ -110,9 +108,4 @@ public class BytedanceDeliveryTargetTemplateServiceImpl extends ServiceImpl<Byte
         result.put("data", template);
         return result;
     }
-
-    @Autowired
-    private ICTopOauthTokenService tokenService;
-    @Autowired
-    private BytedanceDeliveryTargetTemplateMapper deliveryTargetTemplateMapper;
 }

+ 7 - 14
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/CTopOauthTokenServiceImpl.java

@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import constant.KuaishouInterfaceConstant;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.modules.ctop.entity.CTopOauthToken;
 import org.jeecg.modules.ctop.mapper.CTopOauthTokenMapper;
 import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
@@ -26,11 +27,9 @@ import java.util.Map;
  * @Date: 2019-07-09
  * @Version: V1.0
  */
+@Slf4j
 @Service
 public class CTopOauthTokenServiceImpl extends ServiceImpl<CTopOauthTokenMapper, CTopOauthToken> implements ICTopOauthTokenService {
-    private static final Logger logger = LoggerFactory.getLogger(CTopOauthTokenServiceImpl.class);
-
-
     @Autowired
     private CTopOauthTokenMapper cTopOauthTokenMapper;
 
@@ -45,7 +44,6 @@ public class CTopOauthTokenServiceImpl extends ServiceImpl<CTopOauthTokenMapper,
 
     /**
      * 刷新token
-     *
      * @param accountId
      * @return
      */
@@ -68,7 +66,7 @@ public class CTopOauthTokenServiceImpl extends ServiceImpl<CTopOauthTokenMapper,
         JSONObject resultObject = JSONObject.parseObject(result);
         Integer code = resultObject.getInteger("code");
         if (null == code || code != 0) {
-            logger.info("刷新token异常;accountId:{}", accountId);
+            log.info("刷新token异常;accountId:{}", accountId);
             resultMap.put("message", "刷新token异常");
             resultMap.put("code", -1);
             return resultMap;
@@ -77,7 +75,7 @@ public class CTopOauthTokenServiceImpl extends ServiceImpl<CTopOauthTokenMapper,
         CTopOauthToken refreshToken = new CTopOauthToken(token, data);
         cTopOauthTokenMapper.deleteById(token.getId());
         cTopOauthTokenMapper.insert(refreshToken);
-        logger.info("头条刷新token成功:accountId:{}", accountId);
+        log.info("头条刷新token成功:accountId:{}", accountId);
         resultMap.put("message", "token刷新成功");
         resultMap.put("code", 0);
         return resultMap;
@@ -85,7 +83,6 @@ public class CTopOauthTokenServiceImpl extends ServiceImpl<CTopOauthTokenMapper,
 
     /**
      * 快手 刷新token
-     *
      * @param accountId
      * @param refreshToken
      * @return
@@ -122,23 +119,19 @@ public class CTopOauthTokenServiceImpl extends ServiceImpl<CTopOauthTokenMapper,
                             oauthToken.setUpdateTime(new Date());
                             int i = cTopOauthTokenMapper.updateByPrimaryKeySelective(oauthToken);
                             if (i > 0) {
-                                logger.info("快手刷新token成功,accountId:{}", accountId);
-
+                                log.info("快手刷新token成功,accountId:{}", accountId);
                             }
                         }
                     }
                 } else {
-                    logger.error("快手刷新token失败,accountId:{},result:{}", accountId, resultJson);
-
+                    log.error("快手刷新token失败,accountId:{},result:{}", accountId, resultJson);
                 }
             } else {
-                logger.error("快手刷新token返回结果为空,accountId:{}", accountId);
+                log.error("快手刷新token返回结果为空,accountId:{}", accountId);
             }
         } catch (Exception e) {
             e.printStackTrace();
-
         }
-
         return null;
     }
 }

+ 5 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/CreateInternalServiceImpl.java

@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.http.impl.cookie.BasicClientCookie;
 import org.jeecg.common.util.ResultMapUtils;
 import org.jeecg.common.util.StatusCode;
@@ -17,8 +18,6 @@ import org.openqa.selenium.Cookie;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.chrome.ChromeDriver;
 import org.openqa.selenium.chrome.ChromeOptions;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -26,10 +25,9 @@ import sun.misc.BASE64Decoder;
 
 import java.util.*;
 
+@Slf4j
 @Service
 public class CreateInternalServiceImpl implements ICreateInternalService {
-    private static final Logger logger = LoggerFactory.getLogger(CreateInternalServiceImpl.class);
-
     @Value("${jeecg.path.chrome-driver}")
     private String chromeDriver;
     @Autowired
@@ -111,10 +109,11 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
                 webDriver.get("https://ad.oceanengine.com/pages/promotion.html#/ad");//登录成功 进入推广页面
                 Thread.sleep(3000);
                 webDriver.get("https://ad.oceanengine.com/pages/campaign/create.html");//创建广告组页面
+                String templateName = requestJson.getString("templateName");
                 Map<String, Object> campaignParam = new HashMap<>();
                 String uuid = UUID.randomUUID().toString();
                 campaignParam.put("campaign_id", "");
-                campaignParam.put("campaign_name", uuid.substring(1, 7));
+                campaignParam.put("campaign_name", templateName + "-广告组-" + uuid.substring(1, 7));
                 campaignParam.put("landing_type", 3);
                 campaignParam.put("campaign_type", 1);
                 Map<String, Object> budgetMap = new HashMap<>();
@@ -164,7 +163,7 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
                         String tokenStr = HttpUtils2.httpPostRequest("https://ad.oceanengine.com/api/v1/hl/ad/audience/estimate/", audienceParam, header);
                         JsonNode tokenNode = mapper.readTree(tokenStr);
                         Map<String, Object> planParam = new HashMap<>();
-                        planParam.put("name", requestJson.getString("templateName"));//模板名称
+                        planParam.put("name", templateName + "-广告计划-" + uuid.substring(1, 7) + i);//模板名称
                         Integer deliveryRange = requestJson.getInteger("deliveryRange");
                         planParam.put("delivery_range", deliveryRange);  //投放形式
                         if (deliveryRange == 2) {
@@ -224,7 +223,6 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
                         planParam.put("smart_bid_type", requestJson.getIntValue("bidType")); //自动出价类型,OCPM支持
                         planParam.put("adjust_cpa", 0); //是否调整自动出价   允许值: "0", "1"  默认值: 0
                         planParam.put("app_bid_ratio", new Object());
-                        planParam.put("name", "自动创建测试b" + i);  //广计划名称
                         planParam.put("campaign_id", campaignId);
                         String downLoadMode = requestJson.getString("downloadMode");
                         planParam.put("app_type", 201); //app 类型 201 应用推广 安卓 201 应用推广 ios

+ 44 - 40
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/FileInfoServiceImpl.java

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.http.HttpEntity;
 import org.apache.http.client.ClientProtocolException;
@@ -22,12 +23,14 @@ import org.jeecg.common.util.ResultMapUtils;
 import org.jeecg.common.util.StatusCode;
 import org.jeecg.modules.ctop.entity.CTopOauthToken;
 import org.jeecg.modules.ctop.entity.FileInfo;
+import org.jeecg.modules.ctop.entity.SourceFile;
 import org.jeecg.modules.ctop.mapper.ByteDanceImageInfoMapper;
 import org.jeecg.modules.ctop.mapper.ByteDanceVideoInfoMapper;
 import org.jeecg.modules.ctop.mapper.FileInfoMapper;
 import org.jeecg.modules.ctop.service.IByteDanceImageInfoService;
 import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
 import org.jeecg.modules.ctop.service.IFileInfoService;
+import org.jeecg.modules.ctop.service.ISourceFileService;
 import org.jeecg.modules.system.entity.SysCategory;
 import org.jeecg.modules.system.mapper.SysCategoryMapper;
 import org.jeecg.modules.system.service.ISysCategoryService;
@@ -53,10 +56,23 @@ import java.util.Map;
  * @Date: 2019-07-28
  * @Version: V1.0
  */
+@Slf4j
 @Service
 public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> implements IFileInfoService {
-    private static final Logger logger = LoggerFactory.getLogger(FileInfoServiceImpl.class);
-    private FileInfo fileInfo;
+    @Value("${jeecg.path.image-upload}")
+    private String imageUploadPath;
+    @Value("${jeecg.path.video-upload}")
+    private String videoUploadPath;
+    @Autowired
+    FileInfoMapper fileInfoMapper;
+    @Autowired
+    private ISourceFileService sourceFileService;
+    @Autowired
+    private ISysCategoryService categoryService;
+    @Autowired
+    private SysCategoryMapper sysCategoryMapper;
+    @Autowired
+    private ICTopOauthTokenService tokenService;
 
     @Override
     public Map<String, Object> uploadVideoToBytedance(String accountId, String videoUrl) {
@@ -68,12 +84,11 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
         Integer code = resultObject.getInteger("code");
         String message = resultObject.getString("message");
         if (null == code || code != 0) {
-            logger.info("视频文件上传失败,accountId:{},message:{}", accountId, message);
+            log.info("视频文件上传失败,accountId:{},message:{}", accountId, message);
             ResultMapUtils.setResultMap(resultMap, StatusCode.BYTEDANCE_VIDEO_UPLOAD_FAIL.getCode());
             return resultMap;
         }
-        fileInfo = (FileInfo) resultObject.get("file");
-
+        FileInfo fileInfo = (FileInfo) resultObject.get("file");
         ResultMapUtils.setResultMap(resultMap, StatusCode.COMMON_SUCCESS.getCode());
         resultMap.put("videoId", fileInfo.getFileId());
         return resultMap;
@@ -95,7 +110,7 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
             Integer code = resultObject.getInteger("code");
             String message = resultObject.getString("message");
             if (null == code || code != 0) {
-                logger.info("图片文件上传失败,accountId:{},message:{}", accountId, message);
+                log.info("图片文件上传失败,accountId:{},message:{}", accountId, message);
                 ResultMapUtils.setResultMap(resultMap, StatusCode.BYTEDANCE_VIDEO_UPLOAD_FAIL.getCode());
                 return resultMap;
             }
@@ -107,11 +122,6 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
         return resultMap;
     }
 
-    @Autowired
-    private ByteDanceVideoInfoMapper videoInfoMapper;
-    @Autowired
-    private ByteDanceImageInfoMapper imageInfoMapper;
-
     @Override
     public Map<String, Object> uploadImageToBytedance(String accountId, String imageUrl) {
         Map<String, Object> resultMap = new HashMap<>();
@@ -120,7 +130,7 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
         Integer code = resultObject.getInteger("code");
         String message = resultObject.getString("message");
         if (null == code || code != 0) {
-            logger.info("图片文件上传失败,accountId:{},message:{}", accountId, message);
+            log.info("图片文件上传失败,accountId:{},message:{}", accountId, message);
             ResultMapUtils.setResultMap(resultMap, StatusCode.BYTEDANCE_IMAGE_UPLOAD_FAIL.getCode());
             return resultMap;
         }
@@ -132,10 +142,6 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
         return resultMap;
     }
 
-    @Autowired
-    private IByteDanceImageInfoService imageInfoService;
-    @Autowired
-    FileInfoMapper fileInfoMapper;
     @Override
     public Map<String, Object> getIndustryList(String accountId, Integer level) {
         Map<String, Object> resultMap = new HashMap<>();
@@ -202,12 +208,26 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
         return fileInfoMapper.selectList(queryWrapper);
     }
 
-
-    @Autowired
-    private ISysCategoryService categoryService;
-
-    @Autowired
-    private SysCategoryMapper sysCategoryMapper;
+    @Override
+    /**
+     * 校验文件唯一性
+     */
+    public Map<String, Object> checkFile(String code) {
+        Map<String, Object> result = new HashMap<>();
+        QueryWrapper<SourceFile> wrapper = new QueryWrapper<>();
+        wrapper.eq("code", code).orderByDesc("id").last("limit 1");
+        SourceFile file = sourceFileService.getOne(wrapper);
+        if (null != file) {
+            //文件已存在
+            ResultMapUtils.setResultMap(result, StatusCode.FILE_HAS_UPLOAD.getCode());
+            result.put("url", file.getUrl());
+            return result;
+        } else {
+            //文件尚未上传
+            ResultMapUtils.setResultMap(result, StatusCode.FILE_HAS_NOT_UPLOAD.getCode());
+            return result;
+        }
+    }
 
     public JSONObject searchIndustry(CTopOauthToken token, Integer level) {
         // 请求地址
@@ -284,7 +304,7 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
         //文件上传
         JSONObject bytedanceObject = imageUpload(token, advertiserId, imageUrl);
         if (null == bytedanceObject) {
-            logger.info("今日头条图片上传失败");
+            log.info("今日头条图片上传失败");
             result.put("code", -1);
             result.put("message", "今日头条文件上传失败");
             return result;
@@ -347,10 +367,6 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
         return null;
     }
 
-    @Value("${jeecg.path.image-upload}")
-    private String imageUploadPath;
-    @Value("${jeecg.path.video-upload}")
-    private String videoUploadPath;
 
     public String downLoadByURL(String fileUrl) {
         //获取文件名,文件名实际上在URL中可以找到
@@ -411,7 +427,7 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
         //文件上传
         JSONObject bytedanceObject = videoUpload(token, advertiserId, videoPath);
         if (null == bytedanceObject) {
-            logger.info("今日头条视频上传失败");
+            log.info("今日头条视频上传失败");
             result.put("code", -1);
             result.put("message", "今日头条视频上传失败");
             return result;
@@ -424,7 +440,6 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
         result.put("message", "视频上传成功");
         result.put("success", true);
         return result;
-
     }
 
     private JSONObject videoUpload(CTopOauthToken token, String advertiserId, String videoPath) {
@@ -473,15 +488,4 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
         }
         return null;
     }
-
-    @Autowired
-    private ICTopOauthTokenService tokenService;
-
-    public static void main(String[] args) throws Exception {
-
-//        FileUtils.copyURLToFile(new URL("https://ctop-media.oss-cn-beijing.aliyuncs.com/%E9%AB%98%E6%B8%85%E7%89%882-1565344662650.mp4"),new File("D://1234.mp4"));
-//        File file = new File("https://ctop-media.oss-cn-beijing.aliyuncs.com/%E9%AB%98%E6%B8%85%E7%89%882-1565344662650.mp4");
-//        FileInputStream fis = new FileInputStream(file);
-//        fis.read();
-    }
 }

+ 9 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/RefreshTokenServiceImpl.java

@@ -1,6 +1,8 @@
 package org.jeecg.modules.ctop.service.impl;
 
 import cn.com.ctop.common.utils.Check;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.constant.CtopAdConstant;
 import org.jeecg.modules.ctop.entity.CTopOauthToken;
 import org.jeecg.modules.ctop.mapper.CTopOauthTokenMapper;
 import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
@@ -12,9 +14,9 @@ import org.springframework.stereotype.Service;
 
 import java.util.List;
 
+@Slf4j
 @Service
 public class RefreshTokenServiceImpl implements IRefreshTokenService {
-    private static final Logger logger = LoggerFactory.getLogger(RefreshTokenServiceImpl.class);
     @Autowired
     private CTopOauthTokenMapper oauthTokenMapper;
     @Autowired
@@ -22,25 +24,25 @@ public class RefreshTokenServiceImpl implements IRefreshTokenService {
 
     /**
      * 获取所有token
-     *
      * @return
      */
     @Override
     public void getRefresh() {
         List<CTopOauthToken> oauthTokens = oauthTokenMapper.selectAll();
-        logger.info("需要刷新token列表长度:{}", oauthTokens.size());
+        log.info("需要刷新token列表长度:{}", oauthTokens.size());
         if (!Check.isNull(oauthTokens)) {
             for (CTopOauthToken oauthToken : oauthTokens) {
-                if ("1".equals(oauthToken.getMediaId().trim())) { //头条
+                //头条
+                if (CtopAdConstant.PLATFORM_TYPE_BYTEDANCE.equals(oauthToken.getMediaId().trim())) {
                     oauthTokenService.getByteDanceAccessToken(String.valueOf(oauthToken.getAccountId()));
                 }
-                if ("2".equals(oauthToken.getMediaId().trim())) { //快手
+                //快手
+                if (CtopAdConstant.PLATFORM_TYPE_KUAISHOU.equals(oauthToken.getMediaId().trim())) {
                     oauthTokenService.getKuaiShouRefreshToken(oauthToken.getAccountId(), oauthToken.getRefreshToken());
                 }
-
             }
         } else {
-            logger.error("----------------------刷新token获取数据返回结果为空----------------------------------");
+            log.error("----------------------刷新token获取数据返回结果为空----------------------------------");
         }
     }
 }

+ 15 - 57
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ReportServiceImpl.java

@@ -45,6 +45,21 @@ import java.util.Map;
 
 @Service
 public class ReportServiceImpl implements IReportService {
+    @Value("${jeecg.path.csv-upload}")
+    private String csvUploadPath;
+    @Autowired
+    private IPlatformCampaignStatisticInfoService platformCampaignStatisticInfoService;
+    @Autowired
+    private ICustomerPlanStatisticInfoService customerPlanStatisticInfoService;
+    @Autowired
+    private PlatformCampaignStatisticInfoMapper statisticInfoMapper;
+    @Autowired
+    private CustomerPlanStatisticInfoMapper customerPlanStatisticInfoMapper;
+    @Autowired
+    private PlatformCampaignStatisticInfoMapper platformCampaignStatisticInfoMapper;
+    @Autowired
+    private ICTopOauthTokenService tokenService;
+
     @Override
     public Map<String, Object> getAdvertiserReport(JSONObject conditions) {
         conditions = new JSONObject();
@@ -70,16 +85,13 @@ public class ReportServiceImpl implements IReportService {
 
     private JSONObject getAdStat(CTopOauthToken token, JSONObject conditions) {
         final Long advertiserId = token.getAccountId();
-
         // 请求地址
         String url = "https://ad.toutiao.com/open_api/2/report/ad/get/";
-
         final Map filtering = new HashMap() {
             {
                 put("campaign_id", 1L);
             }
         };
-
         // 请求参数
         final Map data = new HashMap() {
             {
@@ -100,12 +112,9 @@ public class ReportServiceImpl implements IReportService {
                 return "GET";
             }
         };
-
         httpEntity.setHeader("Access-Token", token.getAccessToken());
-
         CloseableHttpResponse response = null;
         CloseableHttpClient client = null;
-
         try {
             client = HttpClientBuilder.create().build();
             httpEntity.setURI(URI.create(url));
@@ -196,9 +205,6 @@ public class ReportServiceImpl implements IReportService {
         }
     }
 
-    @Value("${jeecg.path.csv-upload}")
-    private String csvUploadPath;
-
     @Override
     public Map<String, Object> debitAuto(JSONObject data) {
         Map<String, Object> resultMap = new HashMap<>();
@@ -239,16 +245,9 @@ public class ReportServiceImpl implements IReportService {
         }
     }
 
-    @Autowired
-    private IPlatformCampaignStatisticInfoService platformCampaignStatisticInfoService;
-    @Autowired
-    private ICustomerPlanStatisticInfoService customerPlanStatisticInfoService;
-
     public String getExcelDataPath(String date, Long accountId1, Long accountId4) throws Exception {
-
         List<StatisticCampaignVo> statisticCampaign1Vos = statisticInfoMapper.getVoByParams(date, accountId1);
         List<StatisticCampaignVo> statisticCampaign4Vos = statisticInfoMapper.getVoByParams(date, accountId4);
-
         File f = new File(csvUploadPath + "template.xlsx");
         InputStream inputStream = new FileInputStream(f);
         XSSFWorkbook xssfWorkbook = new XSSFWorkbook(inputStream);
@@ -286,7 +285,6 @@ public class ReportServiceImpl implements IReportService {
         if (null != total1) {
             setExcelRow(numbericCellStyle, total1, new String[]{}, totalRow4, "total4");
         }
-
         SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-m-dd");
         String path = csvUploadPath + "report_" + dateFormat.format(new Date()) + ".xlsx";
         FileOutputStream fileOutputStream = new FileOutputStream(path);
@@ -296,9 +294,6 @@ public class ReportServiceImpl implements IReportService {
 
     }
 
-    @Autowired
-    private PlatformCampaignStatisticInfoMapper statisticInfoMapper;
-
     private void setExcelRow(CellStyle numbericCellStyle, StatisticCampaignVo vo, String[] contents, Row row, String type) {
         for (int j = 0; j < 38; j++) {
             Cell cell = row.createCell(j);
@@ -563,11 +558,6 @@ public class ReportServiceImpl implements IReportService {
         }
     }
 
-    @Autowired
-    private CustomerPlanStatisticInfoMapper customerPlanStatisticInfoMapper;
-    @Autowired
-    private PlatformCampaignStatisticInfoMapper platformCampaignStatisticInfoMapper;
-
     public JSONObject getAgentStat(CTopOauthToken token, JSONObject conditions) {
         // 请求地址
         String url = "https://ad.toutiao.com/open_api/2/report/agent/get/";
@@ -588,15 +578,12 @@ public class ReportServiceImpl implements IReportService {
             }
         };
         httpEntity.setHeader("Access-Token", token.getAccessToken());
-
         CloseableHttpResponse response = null;
         CloseableHttpClient client = null;
-
         try {
             client = HttpClientBuilder.create().build();
             httpEntity.setURI(URI.create(url));
             httpEntity.setEntity(new StringEntity(JSONObject.toJSONString(data), ContentType.APPLICATION_JSON));
-
             response = client.execute(httpEntity);
             if (response != null && response.getStatusLine().getStatusCode() == 200) {
                 BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
@@ -626,16 +613,13 @@ public class ReportServiceImpl implements IReportService {
     }
 
     public JSONObject getCreativeStat(CTopOauthToken token, JSONObject conditions) {
-
         // 请求地址
         String url = "https://ad.toutiao.com/open_api/2/report/creative/get/";
-
         final Map filtering = new HashMap() {
             {
                 put("campaign_id", 1L);
             }
         };
-
         // 请求参数
         final Map data = new HashMap() {
             {
@@ -645,7 +629,6 @@ public class ReportServiceImpl implements IReportService {
                 put("time_granularity", "STAT_TIME_GRANULARITY_DAILY");
                 put("group_by", new String[]{"STAT_GROUP_BY_FIELD_ID"});
                 put("filtering", filtering);
-
             }
         };
 
@@ -656,17 +639,13 @@ public class ReportServiceImpl implements IReportService {
                 return "GET";
             }
         };
-
         httpEntity.setHeader("Access-Token", token.getAccessToken());
-
         CloseableHttpResponse response = null;
         CloseableHttpClient client = null;
-
         try {
             client = HttpClientBuilder.create().build();
             httpEntity.setURI(URI.create(url));
             httpEntity.setEntity(new StringEntity(JSONObject.toJSONString(data), ContentType.APPLICATION_JSON));
-
             response = client.execute(httpEntity);
             if (response != null && response.getStatusLine().getStatusCode() == 200) {
                 BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
@@ -678,7 +657,6 @@ public class ReportServiceImpl implements IReportService {
                 bufferedReader.close();
                 return JSONObject.parseObject(result.toString());
             }
-
         } catch (ClientProtocolException e) {
             e.printStackTrace();
         } catch (IOException e) {
@@ -699,13 +677,11 @@ public class ReportServiceImpl implements IReportService {
     public static JSONObject getCampaignStat(CTopOauthToken token, JSONObject conditions) {
         // 请求地址
         String url = "https://ad.toutiao.com/open_api/2/report/campaign/get/";
-
         final Map filtering = new HashMap() {
             {
                 put("campaign_ids", new Long[]{1L, 2L});
             }
         };
-
         // 请求参数
         final Map data = new HashMap() {
             {
@@ -717,10 +693,8 @@ public class ReportServiceImpl implements IReportService {
                 put("time_granularity", conditions.getString("timeGranularity"));
                 put("group_by", conditions.getJSONArray("groupBy"));
                 put("filtering", filtering);
-
             }
         };
-
         // 构造请求
         HttpEntityEnclosingRequestBase httpEntity = new HttpEntityEnclosingRequestBase() {
             @Override
@@ -728,17 +702,13 @@ public class ReportServiceImpl implements IReportService {
                 return "GET";
             }
         };
-
         httpEntity.setHeader("Access-Token", token.getAccessToken());
-
         CloseableHttpResponse response = null;
         CloseableHttpClient client = null;
-
         try {
             client = HttpClientBuilder.create().build();
             httpEntity.setURI(URI.create(url));
             httpEntity.setEntity(new StringEntity(JSONObject.toJSONString(data), ContentType.APPLICATION_JSON));
-
             response = client.execute(httpEntity);
             if (response != null && response.getStatusLine().getStatusCode() == 200) {
                 BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
@@ -750,7 +720,6 @@ public class ReportServiceImpl implements IReportService {
                 bufferedReader.close();
                 return JSONObject.parseObject(result.toString());
             }
-
         } catch (ClientProtocolException e) {
             e.printStackTrace();
         } catch (IOException e) {
@@ -768,15 +737,10 @@ public class ReportServiceImpl implements IReportService {
         return null;
     }
 
-    @Autowired
-    private ICTopOauthTokenService tokenService;
-
     public JSONObject getAdvertiserStat(CTopOauthToken token, JSONObject conditions) {
         final Long advertiserId = token.getAccountId();
-
         // 请求地址
         String url = "https://ad.toutiao.com/open_api/2/report/advertiser/get/";
-
         // 请求参数
         Map data = new HashMap() {
             {
@@ -788,7 +752,6 @@ public class ReportServiceImpl implements IReportService {
                 put("page_size", conditions.getString("page_size"));
             }
         };
-
         // 构造请求
         HttpEntityEnclosingRequestBase httpEntity = new HttpEntityEnclosingRequestBase() {
             @Override
@@ -796,17 +759,13 @@ public class ReportServiceImpl implements IReportService {
                 return "GET";
             }
         };
-
         httpEntity.setHeader("Access-Token", token.getAccessToken());
-
         CloseableHttpResponse response = null;
         CloseableHttpClient client = null;
-
         try {
             client = HttpClientBuilder.create().build();
             httpEntity.setURI(URI.create(url));
             httpEntity.setEntity(new StringEntity(JSONObject.toJSONString(data), ContentType.APPLICATION_JSON));
-
             response = client.execute(httpEntity);
             if (response != null && response.getStatusLine().getStatusCode() == 200) {
                 BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
@@ -818,7 +777,6 @@ public class ReportServiceImpl implements IReportService {
                 bufferedReader.close();
                 return JSONObject.parseObject(result.toString());
             }
-
         } catch (Exception e) {
             e.printStackTrace();
         } finally {

+ 19 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/SourceFileServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.ctop.service.impl;
+
+import org.jeecg.modules.ctop.entity.SourceFile;
+import org.jeecg.modules.ctop.mapper.SourceFileMapper;
+import org.jeecg.modules.ctop.service.ISourceFileService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 统一资源库文件信息
+ * @Author: jeecg-boot
+ * @Date: 2019-09-02
+ * @Version: V1.0
+ */
+@Service
+public class SourceFileServiceImpl extends ServiceImpl<SourceFileMapper, SourceFile> implements ISourceFileService {
+
+}

+ 162 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/SourceFileList.vue

@@ -0,0 +1,162 @@
+<template>
+    <a-card :bordered="false">
+
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+            <a-form layout="inline">
+                <a-row :gutter="24">
+
+                    <a-col :md="6" :sm="8">
+                        <a-form-item label="MD5code码(唯一性校验)">
+                            <a-input placeholder="请输入MD5code码(唯一性校验)" v-model="queryParam.code"></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="8">
+                        <a-form-item label="url">
+                            <a-input placeholder="请输入url" v-model="queryParam.url"></a-input>
+                        </a-form-item>
+                    </a-col>
+</template>
+<a-col :md="6" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+</a-col>
+
+</a-row>
+</a-form>
+</div>
+
+<!-- 操作按钮区域 -->
+<div class="table-operator">
+    <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+    <a-button type="primary" icon="download" @click="handleExportXls('统一资源库文件信息')">导出</a-button>
+    <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
+              @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+    </a-upload>
+    <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+            <a-menu-item key="1" @click="batchDel">
+                <a-icon type="delete"/>
+                删除
+            </a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作
+            <a-icon type="down"/>
+        </a-button>
+    </a-dropdown>
+</div>
+
+<!-- table区域-begin -->
+<div>
+    <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
+        selectedRowKeys.length }}</a>项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+    </div>
+
+    <a-table
+            ref="table"
+            size="middle"
+            bordered
+            rowKey="id"
+            :columns="columns"
+            :dataSource="dataSource"
+            :pagination="ipagination"
+            :loading="loading"
+            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+            @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical"/>
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+    </a-table>
+</div>
+<!-- table区域-end -->
+
+<!-- 表单区域 -->
+<sourceFile-modal ref="modalForm" @ok="modalFormOk"></sourceFile-modal>
+</a-card>
+</template>
+
+<script>
+    import SourceFileModal from './modules/SourceFileModal'
+    import {JeecgListMixin} from '@/mixins/JeecgListMixin'
+
+    export default {
+        name: "SourceFileList",
+        mixins: [JeecgListMixin],
+        components: {
+            SourceFileModal
+        },
+        data() {
+            return {
+                description: '统一资源库文件信息管理页面',
+                // 表头
+                columns: [
+                    {
+                        title: '#',
+                        dataIndex: '',
+                        key: 'rowIndex',
+                        width: 60,
+                        align: "center",
+                        customRender: function (t, r, index) {
+                            return parseInt(index) + 1;
+                        }
+                    },
+                    {
+                        title: 'MD5code码(唯一性校验)',
+                        align: "center",
+                        dataIndex: 'code'
+                    },
+                    {
+                        title: 'url',
+                        align: "center",
+                        dataIndex: 'url'
+                    },
+                    {
+                        title: '操作',
+                        dataIndex: 'action',
+                        align: "center",
+                        scopedSlots: {customRender: 'action'},
+                    }
+                ],
+                url: {
+                    list: "/ctop/sourceFile/list",
+                    delete: "/ctop/sourceFile/delete",
+                    deleteBatch: "/ctop/sourceFile/deleteBatch",
+                    exportXlsUrl: "ctop/sourceFile/exportXls",
+                    importExcelUrl: "ctop/sourceFile/importExcel",
+                },
+            }
+        },
+        computed: {
+            importExcelUrl: function () {
+                return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+            }
+        },
+        methods: {}
+    }
+</script>
+<style scoped>
+    @import '~@assets/less/common.less'
+</style>

+ 128 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/SourceFileModal.vue

@@ -0,0 +1,128 @@
+<template>
+    <a-modal
+            :title="title"
+            :width="800"
+            :visible="visible"
+            :confirmLoading="confirmLoading"
+            @ok="handleOk"
+            @cancel="handleCancel"
+            cancelText="关闭">
+
+        <a-spin :spinning="confirmLoading">
+            <a-form :form="form">
+
+                <a-form-item
+                        :labelCol="labelCol"
+                        :wrapperCol="wrapperCol"
+                        label="MD5code码(唯一性校验)">
+                    <a-input placeholder="请输入MD5code码(唯一性校验)" v-decorator="['code', {}]"/>
+                </a-form-item>
+                <a-form-item
+                        :labelCol="labelCol"
+                        :wrapperCol="wrapperCol"
+                        label="url">
+                    <a-input placeholder="请输入url" v-decorator="['url', {}]"/>
+                </a-form-item>
+
+            </a-form>
+        </a-spin>
+    </a-modal>
+</template>
+
+<script>
+    import {httpAction} from '@/api/manage'
+    import pick from 'lodash.pick'
+    import moment from "moment"
+
+    export default {
+        name: "SourceFileModal",
+        data() {
+            return {
+                title: "操作",
+                visible: false,
+                model: {},
+                labelCol: {
+                    xs: {span: 24},
+                    sm: {span: 5},
+                },
+                wrapperCol: {
+                    xs: {span: 24},
+                    sm: {span: 16},
+                },
+
+                confirmLoading: false,
+                form: this.$form.createForm(this),
+                validatorRules: {},
+                url: {
+                    add: "/ctop/sourceFile/add",
+                    edit: "/ctop/sourceFile/edit",
+                },
+            }
+        },
+        created() {
+        },
+        methods: {
+            add() {
+                this.edit({});
+            },
+            edit(record) {
+                this.form.resetFields();
+                this.model = Object.assign({}, record);
+                this.visible = true;
+                this.$nextTick(() => {
+                    this.form.setFieldsValue(pick(this.model, 'code', 'url'))
+                    //时间格式化
+                });
+
+            },
+            close() {
+                this.$emit('close');
+                this.visible = false;
+            },
+            handleOk() {
+                const that = this;
+                // 触发表单验证
+                this.form.validateFields((err, values) => {
+                    if (!err) {
+                        that.confirmLoading = true;
+                        let httpurl = '';
+                        let method = '';
+                        if (!this.model.id) {
+                            httpurl += this.url.add;
+                            method = 'post';
+                        } else {
+                            httpurl += this.url.edit;
+                            method = 'put';
+                        }
+                        let formData = Object.assign(this.model, values);
+                        //时间格式化
+
+                        console.log(formData)
+                        httpAction(httpurl, formData, method).then((res) => {
+                            if (res.success) {
+                                that.$message.success(res.message);
+                                that.$emit('ok');
+                            } else {
+                                that.$message.warning(res.message);
+                            }
+                        }).finally(() => {
+                            that.confirmLoading = false;
+                            that.close();
+                        })
+
+
+                    }
+                })
+            },
+            handleCancel() {
+                this.close()
+            },
+
+
+        }
+    }
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 135 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/SourceFileModal__Style#Drawer.vue

@@ -0,0 +1,135 @@
+<template>
+    <a-drawer
+            :title="title"
+            :width="800"
+            placement="right"
+            :closable="false"
+            @close="close"
+            :visible="visible"
+    >
+
+        <a-spin :spinning="confirmLoading">
+            <a-form :form="form">
+
+                <a-form-item
+                        :labelCol="labelCol"
+                        :wrapperCol="wrapperCol"
+                        label="MD5code码(唯一性校验)">
+                    <a-input placeholder="请输入MD5code码(唯一性校验)" v-decorator="['code', {}]"/>
+                </a-form-item>
+                <a-form-item
+                        :labelCol="labelCol"
+                        :wrapperCol="wrapperCol"
+                        label="url">
+                    <a-input placeholder="请输入url" v-decorator="['url', {}]"/>
+                </a-form-item>
+
+            </a-form>
+        </a-spin>
+        <a-button type="primary" @click="handleOk">确定</a-button>
+        <a-button type="primary" @click="handleCancel">取消</a-button>
+    </a-drawer>
+</template>
+
+<script>
+    import {httpAction} from '@/api/manage'
+    import pick from 'lodash.pick'
+    import moment from "moment"
+
+    export default {
+        name: "SourceFileModal",
+        data() {
+            return {
+                title: "操作",
+                visible: false,
+                model: {},
+                labelCol: {
+                    xs: {span: 24},
+                    sm: {span: 5},
+                },
+                wrapperCol: {
+                    xs: {span: 24},
+                    sm: {span: 16},
+                },
+
+                confirmLoading: false,
+                form: this.$form.createForm(this),
+                validatorRules: {},
+                url: {
+                    add: "/ctop/sourceFile/add",
+                    edit: "/ctop/sourceFile/edit",
+                },
+            }
+        },
+        created() {
+        },
+        methods: {
+            add() {
+                this.edit({});
+            },
+            edit(record) {
+                this.form.resetFields();
+                this.model = Object.assign({}, record);
+                this.visible = true;
+                this.$nextTick(() => {
+                    this.form.setFieldsValue(pick(this.model, 'code', 'url'))
+                    //时间格式化
+                });
+
+            },
+            close() {
+                this.$emit('close');
+                this.visible = false;
+            },
+            handleOk() {
+                const that = this;
+                // 触发表单验证
+                this.form.validateFields((err, values) => {
+                    if (!err) {
+                        that.confirmLoading = true;
+                        let httpurl = '';
+                        let method = '';
+                        if (!this.model.id) {
+                            httpurl += this.url.add;
+                            method = 'post';
+                        } else {
+                            httpurl += this.url.edit;
+                            method = 'put';
+                        }
+                        let formData = Object.assign(this.model, values);
+                        //时间格式化
+
+                        console.log(formData)
+                        httpAction(httpurl, formData, method).then((res) => {
+                            if (res.success) {
+                                that.$message.success(res.message);
+                                that.$emit('ok');
+                            } else {
+                                that.$message.warning(res.message);
+                            }
+                        }).finally(() => {
+                            that.confirmLoading = false;
+                            that.close();
+                        })
+
+
+                    }
+                })
+            },
+            handleCancel() {
+                this.close()
+            },
+
+
+        }
+    }
+</script>
+
+<style lang="less" scoped>
+    /** Button按钮间距 */
+    .ant-btn {
+        margin-left: 30px;
+        margin-bottom: 30px;
+        float: right;
+    }
+</style>

+ 23 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/fileupload/controller/FileController.java

@@ -0,0 +1,23 @@
+package org.jeecg.modules.fileupload.controller;
+
+import org.jeecg.modules.ctop.service.IFileInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * 素材库工具接口
+ */
+@RestController
+public class FileController {
+
+    @Autowired
+    private IFileInfoService fileInfoService;
+
+    @RequestMapping("file/check")
+    public Map<String, Object> chenckFile(String code) {
+        return fileInfoService.checkFile(code);
+    }
+}

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/fileupload/service/impl/UploadServiceImpl.java

@@ -26,7 +26,6 @@ public class UploadServiceImpl implements IUploadService {
     private String videoUpLoadPath;
     @Value("${jeecg.path.image-upload}")
     private String imageUpLoadPath;
-
     @Autowired
     private IFileInfoService fileInfoService;
 

+ 1 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/shiro/authc/ShiroRealm.java

@@ -86,7 +86,7 @@ public class ShiroRealm extends AuthorizingRealm {
         log.debug("————身份认证————");
         String token = (String) auth.getCredentials();
         if (token == null) {
-            throw new AuthenticationException("token为空!");
+            log.error("token为空!");
         }
         // 校验token有效性
         LoginUser loginUser = this.checkUserTokenIsEffect(token);
@@ -114,7 +114,6 @@ public class ShiroRealm extends AuthorizingRealm {
 
         // 校验token是否超时失效 & 或者账号密码是否错误
         if (!jwtTokenRefresh(token, username, sysUser.getPassword())) {
-            // throw new AuthenticationException("Token失效,请重新登录!");
             log.error("Token失效,请重新登录!");
         }
 

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

@@ -141,4 +141,4 @@ jeecg:
     video-upload: D://upFiles//video//
     image-upload: D://upFiles//image//
     chrome-driver: D://chromedriver.exe
-    csv-upload: D://upFiles//csv//
+    csv-upload: D://upFiles//csv//

+ 2 - 2
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://192.168.0.23:3306/jeecg-boot?useUnicode=true&characterEncoding=UTF-8
+url=jdbc:mysql://39.106.184.70:3306/jeecg-boot?useUnicode=true&characterEncoding=UTF-8
 username=hcst
-password=123456
+password=hcst2019
 database_name=jeecg-boot
 #oracle
 #diver_name=oracle.jdbc.driver.OracleDriver

+ 4 - 0
jeecg-boot-module-system/src/main/resources/log4j.properties

@@ -0,0 +1,4 @@
+log4j.rootLogger=INFO,stdout
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS}-[%p] [%t] %-5l - %m%n

+ 0 - 96
jeecg-boot-module-system/src/main/resources/logback-spring.xml

@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration debug="false">
-    <!--定义日志文件的存储地址 -->
-    <property name="LOG_HOME" value="../logs"/>
-
-    <property name="COLOR_PATTERN"
-              value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)"/>
-    <!-- 控制台输出 -->
-    <appender name="STDOUT"
-              class="ch.qos.logback.core.ConsoleAppender">
-        <encoder
-                class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-            <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
-            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>
-        </encoder>
-    </appender>
-
-    <!-- 按照每天生成日志文件 -->
-    <appender name="FILE"
-              class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <rollingPolicy
-                class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-            <!--日志文件输出的文件名 -->
-            <FileNamePattern>${LOG_HOME}/jeecgboot.%d{yyyy-MM-dd}.log
-            </FileNamePattern>
-            <!--日志文件保留天数 -->
-            <MaxHistory>30</MaxHistory>
-        </rollingPolicy>
-        <encoder
-                class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
-            <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
-            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>
-        </encoder>
-        <!--日志文件最大的大小 -->
-        <triggeringPolicy
-                class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-            <MaxFileSize>10MB</MaxFileSize>
-        </triggeringPolicy>
-    </appender>
-
-    <!-- 生成html格式日志开始 -->
-    <appender name="HTML" class="ch.qos.logback.core.FileAppender">
-        <!-- 过滤器,只记录WARN级别的日志 -->
-        <!-- <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>info</level>
-            <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> -->
-
-        <encoder
-                class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
-            <layout class="ch.qos.logback.classic.html.HTMLLayout">
-                <pattern>%p%d%msg%M%F{32}%L</pattern>
-            </layout>
-        </encoder>
-        <file>${LOG_HOME}/error-log.html</file>
-    </appender>
-    <!-- 生成html格式日志结束 -->
-
-    <!-- 每天生成一个html格式的日志开始 -->
-    <appender name="FILE_HTML"
-              class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <rollingPolicy
-                class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-            <!--日志文件输出的文件名 -->
-            <FileNamePattern>${LOG_HOME}/jeecgboot.%d{yyyy-MM-dd}.html
-            </FileNamePattern>
-            <!--日志文件保留天数 -->
-            <MaxHistory>30</MaxHistory>
-        </rollingPolicy>
-        <encoder
-                class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
-            <layout class="ch.qos.logback.classic.html.HTMLLayout">
-                <pattern>%p%d%msg%M%F{32}%L</pattern>
-            </layout>
-        </encoder>
-        <!--日志文件最大的大小 -->
-        <triggeringPolicy
-                class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
-            <MaxFileSize>10MB</MaxFileSize>
-        </triggeringPolicy>
-    </appender>
-    <!-- 每天生成一个html格式的日志结束 -->
-
-    <!--myibatis log configure -->
-    <logger name="com.apache.ibatis" level="TRACE"/>
-    <logger name="java.sql.Connection" level="DEBUG"/>
-    <logger name="java.sql.Statement" level="DEBUG"/>
-    <logger name="java.sql.PreparedStatement" level="DEBUG"/>
-
-    <!-- 日志输出级别 -->
-    <root level="INFO">
-        <appender-ref ref="STDOUT"/>
-        <appender-ref ref="FILE"/>
-        <appender-ref ref="HTML"/>
-        <appender-ref ref="FILE_HTML"/>
-    </root>
-
-</configuration>

+ 0 - 46
module-common/pom.xml

@@ -57,50 +57,4 @@
             <version>2.0</version>
         </dependency>
     </dependencies>
-
-    <build>
-        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
-            <plugins>
-                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-clean-plugin</artifactId>
-                    <version>3.1.0</version>
-                </plugin>
-                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
-                <plugin>
-                    <artifactId>maven-resources-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>3.8.0</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.22.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-install-plugin</artifactId>
-                    <version>2.5.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>2.8.2</version>
-                </plugin>
-                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-site-plugin</artifactId>
-                    <version>3.7.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-project-info-reports-plugin</artifactId>
-                    <version>3.0.0</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
 </project>

+ 0 - 43
module-crawler/pom.xml

@@ -24,49 +24,6 @@
         </dependency>
     </dependencies>
     <build>
-        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
-            <plugins>
-                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-clean-plugin</artifactId>
-                    <version>3.1.0</version>
-                </plugin>
-                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
-                <plugin>
-                    <artifactId>maven-resources-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>3.8.0</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.22.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-install-plugin</artifactId>
-                    <version>2.5.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>2.8.2</version>
-                </plugin>
-                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-site-plugin</artifactId>
-                    <version>3.7.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-project-info-reports-plugin</artifactId>
-                    <version>3.0.0</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
         <resources>
             <!-- 解决MyBatis配置文件引入问题 -->
             <resource>

+ 0 - 43
module-kuaishou/pom.xml

@@ -36,49 +36,6 @@
     </dependencies>
 
     <build>
-        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
-            <plugins>
-                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-clean-plugin</artifactId>
-                    <version>3.1.0</version>
-                </plugin>
-                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
-                <plugin>
-                    <artifactId>maven-resources-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>3.8.0</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.22.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-install-plugin</artifactId>
-                    <version>2.5.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>2.8.2</version>
-                </plugin>
-                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-site-plugin</artifactId>
-                    <version>3.7.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-project-info-reports-plugin</artifactId>
-                    <version>3.0.0</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
         <resources>
             <!-- 解决MyBatis配置文件引入问题 -->
             <resource>

+ 0 - 46
module-media/pom.xml

@@ -37,50 +37,4 @@
             <scope>compile</scope>
         </dependency>
     </dependencies>
-
-    <build>
-        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
-            <plugins>
-                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-clean-plugin</artifactId>
-                    <version>3.1.0</version>
-                </plugin>
-                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
-                <plugin>
-                    <artifactId>maven-resources-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>3.8.0</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.22.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-install-plugin</artifactId>
-                    <version>2.5.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>2.8.2</version>
-                </plugin>
-                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-site-plugin</artifactId>
-                    <version>3.7.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-project-info-reports-plugin</artifactId>
-                    <version>3.0.0</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
 </project>

+ 0 - 46
module-report/pom.xml

@@ -30,50 +30,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-    <build>
-        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
-            <plugins>
-                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-clean-plugin</artifactId>
-                    <version>3.1.0</version>
-                </plugin>
-                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
-                <plugin>
-                    <artifactId>maven-resources-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>3.8.0</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.22.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-install-plugin</artifactId>
-                    <version>2.5.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>2.8.2</version>
-                </plugin>
-                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-site-plugin</artifactId>
-                    <version>3.7.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-project-info-reports-plugin</artifactId>
-                    <version>3.0.0</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
 </project>

+ 0 - 43
module-toutiao/pom.xml

@@ -36,49 +36,6 @@
     </dependencies>
 
     <build>
-        <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
-            <plugins>
-                <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-clean-plugin</artifactId>
-                    <version>3.1.0</version>
-                </plugin>
-                <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
-                <plugin>
-                    <artifactId>maven-resources-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>3.8.0</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.22.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>3.0.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-install-plugin</artifactId>
-                    <version>2.5.2</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>2.8.2</version>
-                </plugin>
-                <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
-                <plugin>
-                    <artifactId>maven-site-plugin</artifactId>
-                    <version>3.7.1</version>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-project-info-reports-plugin</artifactId>
-                    <version>3.0.0</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
         <resources>
             <!-- 解决MyBatis配置文件引入问题 -->
             <resource>

+ 1 - 7
pom.xml

@@ -397,19 +397,13 @@
                     <skipTests>true</skipTests>
                 </configuration>
             </plugin>
+            <!-- 避免font文件的二进制文件格式压缩破坏 -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-resources-plugin</artifactId>
                 <configuration>
                     <delimiters>@</delimiters>
                     <useDefaultDelimiters>false</useDefaultDelimiters>
-                </configuration>
-            </plugin>
-            <!-- 避免font文件的二进制文件格式压缩破坏 -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <configuration>
                     <nonFilteredFileExtensions>
                         <nonFilteredFileExtension>woff</nonFilteredFileExtension>
                         <nonFilteredFileExtension>woff2</nonFilteredFileExtension>