浏览代码

Merge branch 'test' into testV2

yumeng 5 年之前
父节点
当前提交
9c0aa77494
共有 100 个文件被更改,包括 5032 次插入768 次删除
  1. 1 1
      .gitignore
  2. 25 23
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java
  3. 27 0
      jeecg-boot-module-system/pom.xml
  4. 0 3
      jeecg-boot-module-system/src/main/java/org/jeecg/JeecgApplication.java
  5. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java
  6. 251 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AgentInfoController.java
  7. 7 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CrawlerController.java
  8. 22 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialInfoController.java
  9. 193 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  10. 1 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/UserAllocationController.java
  11. 7 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/Advertiser.java
  12. 63 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/AgentInfo.java
  13. 16 13
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyReportLoadJob.java
  14. 2 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceHourlyReportLoadJob.java
  15. 57 8
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedancePlanDailyReportLoadJob.java
  16. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/EffiVideoJob.java
  17. 15 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/AgentInfoMapper.java
  18. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/xml/AgentInfoMapper.xml
  19. 15 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IAgentInfoService.java
  20. 19 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/AgentInfoServiceImpl.java
  21. 3 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/test/controller/JeecgOrderDmainController.java
  22. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/test/controller/JeecgOrderMainController.java
  23. 11 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/fegin/LogService.java
  24. 2 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/performanceappraisal/controller/OptimizerRoleInfoController.java
  25. 329 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/PerformanceController2.java
  26. 29 29
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java
  27. 23 23
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementSendController.java
  28. 21 21
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserAgentController.java
  29. 1 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysRoleMapper.xml
  30. 65 8
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IPerformanceService2.java
  31. 1410 346
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/PerformanceServiceImpl2.java
  32. 6 0
      jeecg-boot-module-system/src/main/resources/application.yml
  33. 3 3
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  34. 118 0
      log-server/.mvn/wrapper/MavenWrapperDownloader.java
  35. 二进制
      log-server/.mvn/wrapper/maven-wrapper.jar
  36. 2 0
      log-server/.mvn/wrapper/maven-wrapper.properties
  37. 376 0
      log-server/pom.xml
  38. 13 0
      log-server/src/main/java/cn/com/ctop/logserver/LogServerApplication.java
  39. 17 0
      log-server/src/main/java/cn/com/ctop/logserver/controller/LogController.java
  40. 160 0
      log-server/src/main/resources/application-dev.yml
  41. 159 0
      log-server/src/main/resources/application-prod.yml
  42. 161 0
      log-server/src/main/resources/application-test.yml
  43. 15 0
      log-server/src/main/resources/application.yml
  44. 14 0
      log-server/src/main/resources/banner.txt
  45. 4 0
      log-server/src/main/resources/log4j.properties
  46. 57 0
      log-server/src/main/resources/logback-dev.xml
  47. 57 0
      log-server/src/main/resources/logback-prod.xml
  48. 57 0
      log-server/src/main/resources/logback-test.xml
  49. 6 0
      log-server/src/main/resources/quartz.properties
  50. 3 3
      mondule-jbpm/src/test/java/cn/com/ctop/jbpm/JbpmApplicationTests.java
  51. 10 0
      module-common/src/main/java/cn/com/ctop/common/module/entity/MaterialInfo.java
  52. 4 0
      module-common/src/main/java/cn/com/ctop/common/module/mapper/MaterialInfoMapper.java
  53. 17 0
      module-common/src/main/java/cn/com/ctop/common/module/mapper/xml/MaterialInfoMapper.xml
  54. 5 0
      module-common/src/main/java/cn/com/ctop/common/module/service/IMaterialInfoService.java
  55. 11 1
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java
  56. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/utils/CtopAdConstant.java
  57. 1 1
      module-common/src/main/java/cn/com/ctop/common/module/utils/HttpUtils.java
  58. 3 0
      module-common/src/main/java/cn/com/ctop/common/module/utils/StatusCode.java
  59. 37 0
      module-report/src/main/java/cn/com/ctop/bytedance/controller/BytedanceCreativeDailyReportController.java
  60. 10 0
      module-report/src/main/java/cn/com/ctop/bytedance/entity/BytedanceCreativeDailyReport.java
  61. 5 0
      module-report/src/main/java/cn/com/ctop/bytedance/entity/BytedancePlanDailyReport.java
  62. 7 0
      module-report/src/main/java/cn/com/ctop/bytedance/mapper/BytedanceCreativeDailyReportMapper.java
  63. 92 0
      module-report/src/main/java/cn/com/ctop/bytedance/mapper/xml/BytedanceCreativeDailyReportMapper.xml
  64. 9 0
      module-report/src/main/java/cn/com/ctop/bytedance/service/IBytedanceCreativeDailyReportService.java
  65. 44 0
      module-report/src/main/java/cn/com/ctop/bytedance/service/impl/BytedanceCreativeDailyReportServiceImpl.java
  66. 32 17
      module-report/src/main/java/cn/com/ctop/bytedance/service/impl/ReportServiceImpl.java
  67. 5 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/entity/ByteDanceVideoInfo.java
  68. 7 1
      module-toutiao/src/main/resources/bytedance_config.properties
  69. 0 49
      mondule-jbpm/pom.xml
  70. 0 13
      mondule-jbpm/src/main/java/cn/com/ctop/jbpm/JbpmApplication.java
  71. 0 29
      mondule-jbpm/src/main/java/cn/com/ctop/jbpm/service/ActivitiTable.java
  72. 0 1
      mondule-jbpm/src/main/resources/application.properties
  73. 0 76
      mondule-jbpm/src/main/resources/processes/testbpm.bpmn
  74. 118 0
      moudule-eureca/.mvn/wrapper/MavenWrapperDownloader.java
  75. 二进制
      moudule-eureca/.mvn/wrapper/maven-wrapper.jar
  76. 2 0
      moudule-eureca/.mvn/wrapper/maven-wrapper.properties
  77. 62 0
      moudule-eureca/pom.xml
  78. 15 0
      moudule-eureca/src/main/java/cn/com/ctop/eureca/server/ServerApplication.java
  79. 14 0
      moudule-eureca/src/main/resources/application.yml
  80. 13 0
      moudule-eureca/src/test/java/cn/com/ctop/eureca/server/ServerApplicationTests.java
  81. 0 13
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/PerformanceAppraisalApplication.java
  82. 248 0
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/controller/PerformanceConfigController.java
  83. 71 4
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/controller/PerformanceController.java
  84. 48 31
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/controller/PerformanceOptimizerController.java
  85. 11 2
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/OptimizerConfig.java
  86. 3 3
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/Performance.java
  87. 63 0
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/PerformanceConfig.java
  88. 2 2
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/PerformanceOptimizer.java
  89. 2 2
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/RolePerformancRraise.java
  90. 2 2
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/RolePerformanceCommission.java
  91. 15 0
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/mapper/PerformanceConfigMapper.java
  92. 14 5
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/mapper/PerformanceMapper.java
  93. 5 0
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/mapper/xml/PerformanceConfigMapper.xml
  94. 143 8
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/mapper/xml/PerformanceMapper.xml
  95. 1 1
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/IOptimizerConfigService.java
  96. 1 1
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/IOptimizerRoleInfoService.java
  97. 16 0
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/IPerformanceConfigService.java
  98. 2 2
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/IPerformanceOptimizerService.java
  99. 5 4
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/IPerformanceService.java
  100. 0 0
      performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/impl/OptimizerConfigServiceImpl.java

+ 1 - 1
.gitignore

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

+ 25 - 23
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java

@@ -923,7 +923,6 @@ public class DateUtils extends PropertyEditorSupport {
     /**
     /**
      * 根据时间获取季度
      * 根据时间获取季度
      * 1即Q1(1,2,3月),以此类推
      * 1即Q1(1,2,3月),以此类推
-     *
      * @param date
      * @param date
      * @return
      * @return
      */
      */
@@ -947,7 +946,6 @@ public class DateUtils extends PropertyEditorSupport {
 
 
     /**
     /**
      * 获取【所在周】周五的时间(周五为一周第一天,周四为一周最后一天)
      * 获取【所在周】周五的时间(周五为一周第一天,周四为一周最后一天)
-     *
      * @param date
      * @param date
      */
      */
     public static Date getFriday(Date date) {
     public static Date getFriday(Date date) {
@@ -1059,7 +1057,6 @@ public class DateUtils extends PropertyEditorSupport {
     /**
     /**
      * 计算季度开始、结束时间
      * 计算季度开始、结束时间
      * 原则:周五为本周的第一天,下一周的周四为本周的最后一天
      * 原则:周五为本周的第一天,下一周的周四为本周的最后一天
-     *
      * @param year
      * @param year
      * @param quarter
      * @param quarter
      */
      */
@@ -1127,30 +1124,35 @@ public class DateUtils extends PropertyEditorSupport {
         return quarterStartEndDateMap;
         return quarterStartEndDateMap;
     }
     }
 
 
-    public static void main(String[] args) throws ParseException {
-        //SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
-        //Date friDay = DateUtils.getFriday(new Date());
-        //Date effiCalcStart = DateUtils.addDay(friDay,  -14);
-        //System.out.println(sdf.format(effiCalcStart));
-        //Date effiCalcEnd = DateUtils.addDay(friDay,  -1);
-        //System.out.println(sdf.format(effiCalcEnd));
-        //
-        //Date effiEnd = DateUtils.addDay(friDay,  -21);
-        //System.out.println(sdf.format(effiEnd));
-        //Date effiStart = DateUtils.addDay(friDay,  -15);
-        //System.out.println(sdf.format(effiStart));
-
-        Map<String, Integer> map1 = DateUtils.getYearQuarter(DateUtils.parseDate("2020-04-01", "yyyy-MM-dd"));
-
-        Map<String, String> map2 = DateUtils.quarterStartEndDate(2019, 1);
-
-        for (String key : map2.keySet()) {
-            System.out.println(key + ":" + map2.get(key));
+    /**
+     * 获取上个季度的年度和季度数
+     *
+     * @param date
+     * @return
+     */
+    public static Map<String, Integer> lastQuarter(Date date) {
+        Map<String, Integer> resultMap = new HashMap<>();
+        //获取当天所在
+        Map<String, Integer> yearQuarter = getYearQuarter(date);
+        Integer year = yearQuarter.get("year");
+        Integer quarter = yearQuarter.get("quarter");
+
+        Integer lastyear = 0;
+        Integer lastQuarter = 0;
+
+        if (quarter == 4 || quarter == 3 || quarter == 2) {
+            lastyear = year;
+            lastQuarter = quarter - 1;
+        } else {
+            lastyear = year - 1;
+            lastQuarter = 4;
         }
         }
 
 
+        resultMap.put("year", lastyear);
+        resultMap.put("quarter", lastQuarter);
 
 
+        return resultMap;
     }
     }
-
 }
 }
 
 
 
 

+ 27 - 0
jeecg-boot-module-system/pom.xml

@@ -11,6 +11,11 @@
         <version>2.0.2</version>
         <version>2.0.2</version>
     </parent>
     </parent>
 
 
+    <properties>
+        <java.version>1.8</java.version>
+        <spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
+    </properties>
+
     <repositories>
     <repositories>
         <repository>
         <repository>
             <id>aliyun</id>
             <id>aliyun</id>
@@ -36,6 +41,16 @@
     </repositories>
     </repositories>
 
 
     <dependencies>
     <dependencies>
+        <!--<dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>-->
+
         <!-- rabbitmq 依赖jar包-->
         <!-- rabbitmq 依赖jar包-->
         <dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <groupId>org.springframework.boot</groupId>
@@ -138,6 +153,18 @@
         </dependency>
         </dependency>
     </dependencies>
     </dependencies>
 
 
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>${spring-cloud.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
     <build>
     <build>
         <plugins>
         <plugins>
             <plugin>
             <plugin>

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

@@ -20,8 +20,6 @@ import java.net.UnknownHostException;
 @SpringBootApplication
 @SpringBootApplication
 @ComponentScan(basePackages = {"cn.com.ctop", "org.jeecg"})
 @ComponentScan(basePackages = {"cn.com.ctop", "org.jeecg"})
 @Configuration
 @Configuration
-
-
 public class JeecgApplication {
 public class JeecgApplication {
     public static void main(String[] args) throws UnknownHostException {
     public static void main(String[] args) throws UnknownHostException {
         ConfigurableApplicationContext application = SpringApplication.run(JeecgApplication.class, args);
         ConfigurableApplicationContext application = SpringApplication.run(JeecgApplication.class, args);
@@ -36,7 +34,6 @@ public class JeecgApplication {
                 "swagger-ui: \thttp://" + ip + ":" + port + path + "/swagger-ui.html\n\t" +
                 "swagger-ui: \thttp://" + ip + ":" + port + path + "/swagger-ui.html\n\t" +
                 "Doc: \t\thttp://" + ip + ":" + port + path + "/doc.html\n" +
                 "Doc: \t\thttp://" + ip + ":" + port + path + "/doc.html\n" +
                 "----------------------------------------------------------");
                 "----------------------------------------------------------");
-
     }
     }
 
 
     @Bean
     @Bean

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

@@ -73,7 +73,7 @@ public class ShiroConfig {
 		filterChainDefinitionMap.put("/ctop/bytedanceAreaInfo/**", "anon");
 		filterChainDefinitionMap.put("/ctop/bytedanceAreaInfo/**", "anon");
 		filterChainDefinitionMap.put("/ctop/bytedanceInterestCategory/**", "anon");
 		filterChainDefinitionMap.put("/ctop/bytedanceInterestCategory/**", "anon");
 		filterChainDefinitionMap.put("/template/creative/words/get", "anon");
 		filterChainDefinitionMap.put("/template/creative/words/get", "anon");
-        filterChainDefinitionMap.put("/appium/crawler/startJob", "anon");
+		filterChainDefinitionMap.put("/appium/crawler/*", "anon");
 
 
 		//优化师相关
 		//优化师相关
 		//filterChainDefinitionMap.put("/ctop/performanceOptimizer/detail", "anon");
 		//filterChainDefinitionMap.put("/ctop/performanceOptimizer/detail", "anon");

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

@@ -0,0 +1,251 @@
+package org.jeecg.modules.ctop.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.ctop.entity.AgentInfo;
+import org.jeecg.modules.ctop.service.IAgentInfoService;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 代理商信息
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2020-02-18
+ */
+@Slf4j
+@Api(tags = "代理商信息")
+@RestController
+@RequestMapping("/ctop/agentInfo")
+public class AgentInfoController {
+    @Autowired
+    private IAgentInfoService agentInfoService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param agentInfo
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "代理商信息-分页列表查询")
+    @ApiOperation(value = "代理商信息-分页列表查询", notes = "代理商信息-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<AgentInfo>> queryPageList(AgentInfo agentInfo,
+                                                  @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                  @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                  HttpServletRequest req) {
+        Result<IPage<AgentInfo>> result = new Result<IPage<AgentInfo>>();
+        agentInfo.setEnabled(1);
+        QueryWrapper<AgentInfo> queryWrapper = QueryGenerator.initQueryWrapper(agentInfo, req.getParameterMap());
+        Page<AgentInfo> page = new Page<>(pageNo, pageSize);
+        IPage<AgentInfo> pageList = agentInfoService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param agentInfo
+     * @return
+     */
+    @AutoLog(value = "代理商信息-添加")
+    @ApiOperation(value = "代理商信息-添加", notes = "代理商信息-添加")
+    @PostMapping(value = "/add")
+    public Result<AgentInfo> add(@RequestBody AgentInfo agentInfo) {
+        Result<AgentInfo> result = new Result<AgentInfo>();
+        try {
+            agentInfo.setEnabled(1);
+            agentInfo.setEnabled(1);
+            agentInfoService.save(agentInfo);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param agentInfo
+     * @return
+     */
+    @AutoLog(value = "代理商信息-编辑")
+    @ApiOperation(value = "代理商信息-编辑", notes = "代理商信息-编辑")
+    @PutMapping(value = "/edit")
+    public Result<AgentInfo> edit(@RequestBody AgentInfo agentInfo) {
+        Result<AgentInfo> result = new Result<AgentInfo>();
+        AgentInfo agentInfoEntity = agentInfoService.getById(agentInfo.getId());
+        if (agentInfoEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = agentInfoService.updateById(agentInfo);
+            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 {
+            agentInfoService.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<AgentInfo> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<AgentInfo> result = new Result<AgentInfo>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.agentInfoService.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<AgentInfo> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<AgentInfo> result = new Result<AgentInfo>();
+        AgentInfo agentInfo = agentInfoService.getById(id);
+        if (agentInfo == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(agentInfo);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<AgentInfo> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                AgentInfo agentInfo = JSON.parseObject(deString, AgentInfo.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(agentInfo, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<AgentInfo> pageList = agentInfoService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "代理商信息列表");
+        mv.addObject(NormalExcelConstants.CLASS, AgentInfo.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<AgentInfo> listAgentInfos = ExcelImportUtil.importExcel(file.getInputStream(), AgentInfo.class, params);
+                agentInfoService.saveBatch(listAgentInfos);
+                return Result.ok("文件导入成功!数据行数:" + listAgentInfos.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("文件导入失败!");
+    }
+
+}

+ 7 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CrawlerController.java

@@ -3,10 +3,7 @@ package org.jeecg.modules.ctop.controller;
 import org.jeecg.modules.ctop.service.ICrawlerService;
 import org.jeecg.modules.ctop.service.ICrawlerService;
 import org.jeecg.modules.ctop.vo.KuaishouAppiumJobVO;
 import org.jeecg.modules.ctop.vo.KuaishouAppiumJobVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 
 import java.util.Map;
 import java.util.Map;
 
 
@@ -20,4 +17,10 @@ public class CrawlerController {
     public Map<String, Object> runTask(@RequestBody KuaishouAppiumJobVO jobVO) {
     public Map<String, Object> runTask(@RequestBody KuaishouAppiumJobVO jobVO) {
         return crawlerService.startJob(jobVO);
         return crawlerService.startJob(jobVO);
     }
     }
+
+    public static void main(String[] args) {
+        int a = 2;
+        int b = 7791;
+        System.out.println(a & b);
+    }
 }
 }

+ 22 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialInfoController.java

@@ -46,8 +46,6 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
 
 
 /**
 /**
  * 素材信息
  * 素材信息
@@ -192,6 +190,28 @@ public class MaterialInfoController {
 
 
         Page<MaterialInfo> page = new Page<>(pageNo, pageSize);
         Page<MaterialInfo> page = new Page<>(pageNo, pageSize);
         IPage<MaterialInfo> pageList = materialInfoService.page(page, queryWrapper);
         IPage<MaterialInfo> pageList = materialInfoService.page(page, queryWrapper);
+
+        List<MaterialInfo> materialInfoList = pageList.getRecords();
+
+        if (materialInfoList.size() != 0){
+            for (MaterialInfo material:materialInfoList){
+                //判断是否已经同步到快手平台
+                Integer kuaishouMaterialUpCount = materialInfoService.getKuaishouUpVideoCount(material.getCode());
+                if (kuaishouMaterialUpCount>0){
+                    material.setKuaishouVideoIsUp(1);
+                }else{
+                    material.setKuaishouVideoIsUp(0);
+                }
+                //判断是否已经同步到抖音平台
+                Integer toutiaoMaterialUpCount = materialInfoService.getToutiaoUpVideoCount(material.getCode());
+                if(toutiaoMaterialUpCount >0){
+                    material.setToutiaoVideoIsUp(1);
+                }else{
+                    material.setToutiaoVideoIsUp(0);
+                }
+            }
+        }
+
         result.setSuccess(true);
         result.setSuccess(true);
         result.setResult(pageList);
         result.setResult(pageList);
         return result;
         return result;

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

@@ -1,12 +1,22 @@
 package org.jeecg.modules.ctop.controller;
 package org.jeecg.modules.ctop.controller;
 
 
+import cn.com.ctop.bytedance.entity.BytedancePlanDailyReport;
+import cn.com.ctop.bytedance.service.IBytedancePlanDailyReportService;
+import cn.com.ctop.bytedance.service.IReportService;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
+import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.mapper.CtopOauthTokenMapper;
 import cn.com.ctop.common.module.mapper.CtopOauthTokenMapper;
+import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.common.module.service.IUserAllocationService;
+import cn.com.ctop.common.module.utils.CtopAdConstant;
+import cn.com.ctop.common.module.utils.ResultMapUtils;
+import cn.com.ctop.common.module.utils.StatusCode;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.SneakyThrows;
 import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.modules.ctop.service.ICreateInternalService;
 import org.jeecg.modules.ctop.service.ICreateInternalService;
@@ -14,10 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
+import java.util.*;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Executors;
 
 
@@ -26,6 +33,7 @@ import java.util.concurrent.Executors;
  */
  */
 @RestController
 @RestController
 @RequestMapping("/test")
 @RequestMapping("/test")
+@Slf4j
 public class TestController {
 public class TestController {
     @Autowired
     @Autowired
     private ICreateInternalService createInternalService;
     private ICreateInternalService createInternalService;
@@ -243,4 +251,185 @@ public class TestController {
         thread.start();
         thread.start();
     }
     }
 
 
+    @Autowired
+    private IUserAllocationService userAllocationService;
+
+    @Autowired
+    private IBytedancePlanDailyReportService planDailyReportService;
+    @Autowired
+    private ICtopOauthTokenService tokenService;
+
+    @GetMapping("formatZybData")
+    public Map<String, Object> formatZybData() {
+        //清洗关于作业帮数据
+        //1:查询作业帮相关的用户数据
+        QueryWrapper<UserAllocation> wrapper = new QueryWrapper<>();
+        wrapper.eq("project_id", 215);
+        List<UserAllocation> allocations = userAllocationService.list(wrapper);
+        if (null != allocations && allocations.size() > 0) {
+            allocations.forEach(allocation -> {
+                //根据accountId和时间,查询相关的日报表信息
+                QueryWrapper<BytedancePlanDailyReport> queryWrapper = new QueryWrapper<>();
+                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+//                String dateString = dateFormat.format(getDate)+" 00:00:00";
+                queryWrapper.eq("advertiser_id", allocation.getAccountId())
+//                        .eq("stat_datetime",dateString)
+                ;
+                List<BytedancePlanDailyReport> bytedancePlanDailyReports = planDailyReportService.list(queryWrapper);
+                if (null != bytedancePlanDailyReports && bytedancePlanDailyReports.size() > 0) {
+                    bytedancePlanDailyReports.forEach(report -> {
+                        String adName = report.getAdName();
+                        String[] tags = adName.split("-");
+                        report.setAdsense(tags[1]);
+                        report.setPlanCode(tags[2]);
+                        String materialName = tags[3];
+                        report.setMaterialName(materialName);
+                        if (materialName.contains("其他")) {
+                            report.setMaterialType("其他");
+                        } else if (materialName.contains("图片轮播")) {
+                            report.setMaterialType("图片轮播");
+                        } else if (materialName.contains("大字报")) {
+                            report.setMaterialType("大字报");
+                        } else if (materialName.contains("文字动画")) {
+                            report.setMaterialType("文字动画");
+                        } else if (materialName.contains("采访形式")) {
+                            report.setMaterialType("采访形式");
+                        } else if (materialName.contains("剧情")) {
+                            report.setMaterialType("剧情");
+                        } else if (materialName.contains("口播")) {
+                            report.setMaterialType("口播");
+                        } else {
+                            report.setMaterialType("其他");
+                        }
+                        planDailyReportService.updateById(report);
+                    });
+                }
+            });
+        }
+        Map<String, Object> result = new HashMap<>();
+        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
+        return result;
+    }
+
+    @Autowired
+    private IReportService reportService;
+
+    @GetMapping("bytedanceHourReport")
+    public Map<String, Object> testReport() {
+        Map<String, Object> result = new HashMap<>();
+        log.info("头条时报数据获取开始");
+        Date getDate = new Date();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
+        String hour = simpleDateFormat.format(getDate);
+        if (null != hour && "00".equals(hour)) {
+            getDate = DateUtils.addDay(getDate, -1);
+        }
+        //1:查询当日数据
+        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
+        if (null == tokens || tokens.size() <= 0) {
+            log.info("定时获取头条小时数据异常:未获取到可用的token");
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
+            return result;
+        }
+        executorService = Executors.newFixedThreadPool(4);
+        Date finalGetDate = getDate;
+        tokens.forEach(token -> {
+            executorService.submit(new Runnable() {
+                @Override
+                public void run() {
+                    //1: 获取广告主信息数据
+                    reportService.getAdvertiserReport(token, finalGetDate, finalGetDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
+                    //2:获取广告组信息数据
+                    //reportService.getAdvertiserCampaignReport(token, finalGetDate, finalGetDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
+                    //3:获取广告计划信息数据
+                    //reportService.getAdvertiserPlanReport(token, finalGetDate, finalGetDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
+                    //4: 获取广告创意信息数据
+                    //reportService.getAdvertiserCreativeReport(token, finalGetDate, finalGetDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
+                }
+
+            });
+
+        });
+        log.info("头条时报数据获取结束");
+        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
+        return result;
+    }
+
+    @GetMapping("formatYddData")
+    public Map<String, Object> formatYddData() throws Exception {
+        Map<String, Object> result = new HashMap<>();
+        //清洗关于缘多多数据
+        //1:查询缘多多相关的用户数据
+        QueryWrapper<UserAllocation> yddWrapper = new QueryWrapper<>();
+        yddWrapper.eq("project_id", 113);
+        List<UserAllocation> yddallocations = userAllocationService.list(yddWrapper);
+        if (null != yddallocations && yddallocations.size() > 0) {
+            yddallocations.forEach(allocation -> {
+                //根据accountId和时间,查询相关的日报表信息
+                QueryWrapper<BytedancePlanDailyReport> queryWrapper = new QueryWrapper<>();
+                queryWrapper.eq("advertiser_id", allocation.getAccountId())
+                //.eq("stat_datetime",dateString)
+                ;
+                List<BytedancePlanDailyReport> bytedancePlanDailyReports = planDailyReportService.list(queryWrapper);
+                if (null != bytedancePlanDailyReports && bytedancePlanDailyReports.size() > 0) {
+                    bytedancePlanDailyReports.forEach(report -> {
+                        String adName = report.getAdName();
+                        String[] tags = adName.split("-");
+                        report.setChannelCode(tags[0]);
+                        planDailyReportService.updateById(report);
+                    });
+                }
+            });
+        }
+
+        //清洗关于缘多多数据
+        //1:查询缘多多相关的用户数据
+        QueryWrapper<UserAllocation> dsjyWrapper = new QueryWrapper<>();
+        yddWrapper.eq("project_id", 112);
+        List<UserAllocation> dsjyAllocations = userAllocationService.list(dsjyWrapper);
+        if (null != dsjyAllocations && dsjyAllocations.size() > 0) {
+            dsjyAllocations.forEach(allocation -> {
+                //根据accountId和时间,查询相关的日报表信息
+                QueryWrapper<BytedancePlanDailyReport> queryWrapper = new QueryWrapper<>();
+                queryWrapper.eq("advertiser_id", allocation.getAccountId())
+                //.eq("stat_datetime",dateString)
+                ;
+                List<BytedancePlanDailyReport> bytedancePlanDailyReports = planDailyReportService.list(queryWrapper);
+                if (null != bytedancePlanDailyReports && bytedancePlanDailyReports.size() > 0) {
+                    bytedancePlanDailyReports.forEach(report -> {
+                        String adName = report.getAdName();
+                        String[] tags = adName.split("-");
+                        report.setChannelCode(tags[0]);
+                        planDailyReportService.updateById(report);
+                    });
+                }
+            });
+        }
+
+        //清洗关于缘多多数据
+        //1:查询缘多多相关的用户数据
+        QueryWrapper<UserAllocation> fjyhWrapper = new QueryWrapper<>();
+        yddWrapper.eq("project_id", 222);
+        List<UserAllocation> fjyhAllocations = userAllocationService.list(fjyhWrapper);
+        if (null != fjyhAllocations && fjyhAllocations.size() > 0) {
+            fjyhAllocations.forEach(allocation -> {
+                //根据accountId和时间,查询相关的日报表信息
+                QueryWrapper<BytedancePlanDailyReport> queryWrapper = new QueryWrapper<>();
+                queryWrapper.eq("advertiser_id", allocation.getAccountId())
+                //.eq("stat_datetime",dateString)
+                ;
+                List<BytedancePlanDailyReport> bytedancePlanDailyReports = planDailyReportService.list(queryWrapper);
+                if (null != bytedancePlanDailyReports && bytedancePlanDailyReports.size() > 0) {
+                    bytedancePlanDailyReports.forEach(report -> {
+                        String adName = report.getAdName();
+                        String[] tags = adName.split("-");
+                        report.setChannelCode(tags[0]);
+                        planDailyReportService.updateById(report);
+                    });
+                }
+            });
+        }
+        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
+        return result;
+    }
 }
 }

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

@@ -203,6 +203,7 @@ public class UserAllocationController {
             if (!Check.isNull(project)) {
             if (!Check.isNull(project)) {
                 queryWrapper.eq("media_id", project.getMediaId());
                 queryWrapper.eq("media_id", project.getMediaId());
             }
             }
+            queryWrapper.isNotNull("account_id");
             List<UserAllocation> userAllocations = userAllocationMapper.selectList(queryWrapper);
             List<UserAllocation> userAllocations = userAllocationMapper.selectList(queryWrapper);
             result.setSuccess(true);
             result.setSuccess(true);
             result.setResult(userAllocations);
             result.setResult(userAllocations);

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

@@ -53,6 +53,13 @@ public class Advertiser {
     @ApiModelProperty(value = "销售ID")
     @ApiModelProperty(value = "销售ID")
     private String saleId;
     private String saleId;
     /**
     /**
+     * 销售ID
+     */
+    @Excel(name = "广告主类别", width = 15)
+    @ApiModelProperty(value = "广告主类别")
+    private Integer advertiserType;
+
+    /**
      * 联系人姓名
      * 联系人姓名
      */
      */
     @Excel(name = "联系人姓名", width = 15)
     @Excel(name = "联系人姓名", width = 15)

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

@@ -0,0 +1,63 @@
+package org.jeecg.modules.ctop.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 代理商信息
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2020-02-18
+ */
+@Data
+@TableName("ctop_agent_info")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_agent_info对象", description = "代理商信息")
+public class AgentInfo {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+    /**
+     * name
+     */
+    @Excel(name = "name", width = 15)
+    @ApiModelProperty(value = "name")
+    private String name;
+    /**
+     * 状态
+     */
+    @Excel(name = "状态", width = 15)
+    @ApiModelProperty(value = "状态")
+    private Integer status;
+    /**
+     * 是否可用
+     */
+    @Excel(name = "是否可用", width = 15)
+    @ApiModelProperty(value = "是否可用")
+    private Integer enabled;
+    /**
+     * createTime
+     */
+    @ApiModelProperty(value = "createTime")
+    private Date createTime;
+    /**
+     * updateTime
+     */
+    @ApiModelProperty(value = "updateTime")
+    private Date updateTime;
+}

+ 16 - 13
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedanceDailyReportLoadJob.java

@@ -1,14 +1,9 @@
 package org.jeecg.modules.ctop.job;
 package org.jeecg.modules.ctop.job;
 
 
-import cn.com.ctop.bytedance.entity.BytedancePlanDailyReport;
-import cn.com.ctop.bytedance.service.IBytedancePlanDailyReportService;
 import cn.com.ctop.bytedance.service.IReportService;
 import cn.com.ctop.bytedance.service.IReportService;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.common.util.DateUtils;
 import org.quartz.Job;
 import org.quartz.Job;
@@ -18,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 
 
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 
 /**
 /**
  * @author syh
  * @author syh
@@ -29,8 +26,8 @@ public class BytedanceDailyReportLoadJob implements Job {
     private ICtopOauthTokenService tokenService;
     private ICtopOauthTokenService tokenService;
     @Autowired
     @Autowired
     private IReportService reportService;
     private IReportService reportService;
-    @Autowired
-    private IUserAllocationService userAllocationService;
+    static ExecutorService executorService = null;
+
 
 
     @Override
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
@@ -41,18 +38,24 @@ public class BytedanceDailyReportLoadJob implements Job {
             log.info("定时获取头条数据异常:为获取到可用的token");
             log.info("定时获取头条数据异常:为获取到可用的token");
             return;
             return;
         }
         }
+        executorService = Executors.newFixedThreadPool(5);
         tokens.forEach(token -> {
         tokens.forEach(token -> {
-            //1: 获取广告主信息数据
-            reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+            executorService.submit(new Runnable() {
+                @Override
+                public void run() {
+                    //1: 获取广告主信息数据
+                    reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
 //            2:获取广告组信息数据
 //            2:获取广告组信息数据
 //            reportService.getAdvertiserCampaignReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
 //            reportService.getAdvertiserCampaignReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
-            //3:获取广告计划信息数据
+                    //3:获取广告计划信息数据
 //            reportService.getAdvertiserPlanReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
 //            reportService.getAdvertiserPlanReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
-            //4: 获取广告创意信息数据
+                    //4: 获取广告创意信息数据
 //            reportService.getAdvertiserCreativeReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
 //            reportService.getAdvertiserCreativeReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+
+                }
+            });
         });
         });
     }
     }
 
 
-    @Autowired
-    private IBytedancePlanDailyReportService planDailyReportService;
+
 }
 }

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

@@ -30,6 +30,7 @@ public class BytedanceHourlyReportLoadJob implements Job {
 
 
     @Override
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
+        log.info("头条时报数据获取开始");
         Date getDate = new Date();
         Date getDate = new Date();
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
         String hour = simpleDateFormat.format(getDate);
         String hour = simpleDateFormat.format(getDate);
@@ -61,5 +62,6 @@ public class BytedanceHourlyReportLoadJob implements Job {
             });
             });
 
 
         });
         });
+        log.info("头条时报数据获取结束");
     }
     }
 }
 }

+ 57 - 8
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedancePlanDailyReportLoadJob.java

@@ -63,20 +63,21 @@ public class BytedancePlanDailyReportLoadJob implements Job {
                         String[] tags = adName.split("-");
                         String[] tags = adName.split("-");
                         report.setAdsense(tags[1]);
                         report.setAdsense(tags[1]);
                         report.setPlanCode(tags[2]);
                         report.setPlanCode(tags[2]);
-                        String tag = tags[3];
-                        if(tag.contains("其他")){
+                        String materialName = tags[3];
+                        report.setMaterialName(materialName);
+                        if (materialName.contains("其他")) {
                             report.setMaterialType("其他");
                             report.setMaterialType("其他");
-                        }else if (tag.contains("图片轮播")){
+                        } else if (materialName.contains("图片轮播")) {
                             report.setMaterialType("图片轮播");
                             report.setMaterialType("图片轮播");
-                        }else if(tag.contains("大字报")){
+                        } else if (materialName.contains("大字报")) {
                             report.setMaterialType("大字报");
                             report.setMaterialType("大字报");
-                        }else if(tag.contains("文字动画")){
+                        } else if (materialName.contains("文字动画")) {
                             report.setMaterialType("文字动画");
                             report.setMaterialType("文字动画");
-                        }else if(tag.contains("采访形式")){
+                        } else if (materialName.contains("采访形式")) {
                             report.setMaterialType("采访形式");
                             report.setMaterialType("采访形式");
-                        }else if(tag.contains("剧情")){
+                        } else if (materialName.contains("剧情")) {
                             report.setMaterialType("剧情");
                             report.setMaterialType("剧情");
-                        }else if(tag.contains("口播")){
+                        } else if (materialName.contains("口播")) {
                             report.setMaterialType("口播");
                             report.setMaterialType("口播");
                         }else{
                         }else{
                             report.setMaterialType("其他");
                             report.setMaterialType("其他");
@@ -112,6 +113,54 @@ public class BytedancePlanDailyReportLoadJob implements Job {
                 }
                 }
             });
             });
         }
         }
+
+        //清洗关于缘多多数据
+        //1:查询缘多多相关的用户数据
+        QueryWrapper<UserAllocation> dsjyWrapper = new QueryWrapper<>();
+        yddWrapper.eq("project_id", 112);
+        List<UserAllocation> dsjyAllocations = userAllocationService.list(dsjyWrapper);
+        if (null != dsjyAllocations && dsjyAllocations.size() > 0) {
+            dsjyAllocations.forEach(allocation -> {
+                //根据accountId和时间,查询相关的日报表信息
+                QueryWrapper<BytedancePlanDailyReport> queryWrapper = new QueryWrapper<>();
+                queryWrapper.eq("advertiser_id", allocation.getAccountId())
+                //.eq("stat_datetime",dateString)
+                ;
+                List<BytedancePlanDailyReport> bytedancePlanDailyReports = planDailyReportService.list(queryWrapper);
+                if (null != bytedancePlanDailyReports && bytedancePlanDailyReports.size() > 0) {
+                    bytedancePlanDailyReports.forEach(report -> {
+                        String adName = report.getAdName();
+                        String[] tags = adName.split("-");
+                        report.setChannelCode(tags[0]);
+                        planDailyReportService.updateById(report);
+                    });
+                }
+            });
+        }
+
+        //清洗关于附近约会数据
+        //1:查询附近约会相关的用户数据
+        QueryWrapper<UserAllocation> fjyhWrapper = new QueryWrapper<>();
+        yddWrapper.eq("project_id", 222);
+        List<UserAllocation> fjyhAllocations = userAllocationService.list(fjyhWrapper);
+        if (null != fjyhAllocations && fjyhAllocations.size() > 0) {
+            fjyhAllocations.forEach(allocation -> {
+                //根据accountId和时间,查询相关的日报表信息
+                QueryWrapper<BytedancePlanDailyReport> queryWrapper = new QueryWrapper<>();
+                queryWrapper.eq("advertiser_id", allocation.getAccountId())
+                //.eq("stat_datetime",dateString)
+                ;
+                List<BytedancePlanDailyReport> bytedancePlanDailyReports = planDailyReportService.list(queryWrapper);
+                if (null != bytedancePlanDailyReports && bytedancePlanDailyReports.size() > 0) {
+                    bytedancePlanDailyReports.forEach(report -> {
+                        String adName = report.getAdName();
+                        String[] tags = adName.split("-");
+                        report.setChannelCode(tags[0]);
+                        planDailyReportService.updateById(report);
+                    });
+                }
+            });
+        }
     }
     }
 
 
     @Autowired
     @Autowired

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/EffiVideoJob.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.ctop.job;
 package org.jeecg.modules.ctop.job;
 
 
 
 
+import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.modules.system.service.IPerformanceService2;
 import org.jeecg.modules.system.service.IPerformanceService2;
 import org.quartz.Job;
 import org.quartz.Job;
@@ -12,6 +13,7 @@ import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Date;
 
 
+@Slf4j
 public class EffiVideoJob implements Job {
 public class EffiVideoJob implements Job {
     @Autowired
     @Autowired
     private IPerformanceService2 performanceService;
     private IPerformanceService2 performanceService;
@@ -26,6 +28,9 @@ public class EffiVideoJob implements Job {
     public void execute(JobExecutionContext jobExecutionContext) {
     public void execute(JobExecutionContext jobExecutionContext) {
         //有效视频定时任务,默认跑前一天的
         //有效视频定时任务,默认跑前一天的
         DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        String calcDate = sdf.format(DateUtils.addDay(new Date(), -1));
+        log.info("有效视频定时任务开始执行,有效视频所属时间为" + calcDate);
         performanceService.efficientVideoTask(sdf.format(DateUtils.addDay(new Date(), -1)));
         performanceService.efficientVideoTask(sdf.format(DateUtils.addDay(new Date(), -1)));
+        log.info("有效视频定时任务结束");
     }
     }
 }
 }

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

@@ -0,0 +1,15 @@
+package org.jeecg.modules.ctop.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.ctop.entity.AgentInfo;
+
+/**
+ * 代理商信息
+ *
+ * @author: jeecg-boot
+ * @date: 2020-02-18
+ * @cersion: V1.0
+ */
+public interface AgentInfoMapper extends BaseMapper<AgentInfo> {
+
+}

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

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

@@ -0,0 +1,15 @@
+package org.jeecg.modules.ctop.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.ctop.entity.AgentInfo;
+
+/**
+ * 代理商信息
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2020-02-18
+ */
+public interface IAgentInfoService extends IService<AgentInfo> {
+
+}

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

@@ -0,0 +1,19 @@
+package org.jeecg.modules.ctop.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.ctop.entity.AgentInfo;
+import org.jeecg.modules.ctop.mapper.AgentInfoMapper;
+import org.jeecg.modules.ctop.service.IAgentInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 代理商信息
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2020-02-18
+ */
+@Service
+public class AgentInfoServiceImpl extends ServiceImpl<AgentInfoMapper, AgentInfo> implements IAgentInfoService {
+
+}

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/test/controller/JeecgOrderDmainController.java

@@ -32,7 +32,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 
 
 /**
 /**
- * @Title: Controller
+ * @Title: controller
  * @Description: 订单模拟
  * @Description: 订单模拟
  * @Author: ZhiLin
  * @Author: ZhiLin
  * @Date: 2019-02-20
  * @Date: 2019-02-20
@@ -322,7 +322,7 @@ public class JeecgOrderDmainController {
         }
         }
         return result;
         return result;
     }
     }
-//===========================以下是机票的相关API====================================	
+//===========================以下是机票的相关API====================================
 
 
     /**
     /**
      * 添加
      * 添加
@@ -422,4 +422,4 @@ public class JeecgOrderDmainController {
         return result;
         return result;
     }
     }
 
 
-}
+}

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/test/controller/JeecgOrderMainController.java

@@ -33,7 +33,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
 /**
 /**
- * @Title: Controller
+ * @Title: controller
  * @Description: 订单
  * @Description: 订单
  * @Author: jeecg-boot
  * @Author: jeecg-boot
  * @Date:2019-02-15
  * @Date:2019-02-15

+ 11 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/fegin/LogService.java

@@ -0,0 +1,11 @@
+//package org.jeecg.modules.fegin;
+//
+//import org.springframework.cloud.openfeign.FeignClient;
+//import org.springframework.web.bind.annotation.GetMapping;
+//import org.springframework.web.bind.annotation.RequestParam;
+//
+//@FeignClient(name = "log-service")
+//public interface LogService {
+//    @GetMapping("hi")
+//    String home(@RequestParam(value = "name") String name);
+//}

+ 2 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/performanceappraisal/controller/OptimizerRoleInfoController.java

@@ -175,7 +175,7 @@ public class OptimizerRoleInfoController {
      * 获取优化师经理的统计数据
      * 获取优化师经理的统计数据
      */
      */
     @GetMapping("manager/detail")
     @GetMapping("manager/detail")
-    public Map<String, Object> managerDetail(Integer appType) {
-        return optimizerRoleInfoService.getmanagerDetail(appType);
+    public Map<String, Object> managerDetail(@RequestParam(name = "orgCode", defaultValue = "A01") String orgCode, @RequestParam(name = "appType", defaultValue = "2") String appType) {
+        return optimizerRoleInfoService.getManagerDetail(appType, orgCode);
     }
     }
 }
 }

+ 329 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/PerformanceController2.java

@@ -1,16 +1,29 @@
 package org.jeecg.modules.system.controller;
 package org.jeecg.modules.system.controller;
 
 
-import cn.com.ctop.crawler.modules.account.entity.KuaishouAppAccount;
+import cn.com.ctop.performanceappraisal.entity.Performance;
 import cn.com.ctop.userefficientvideomap.entity.DesignMaterialInfo;
 import cn.com.ctop.userefficientvideomap.entity.DesignMaterialInfo;
+import cn.com.ctop.userefficientvideomap.entity.PerformanceTimeDTO;
+import cn.com.ctop.userefficientvideomap.entity.UserDto2;
+import cn.com.ctop.userefficientvideomap.mapper.UserEfficientVideoMapMapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.DateUtils;
 import org.jeecg.modules.system.service.IPerformanceService2;
 import org.jeecg.modules.system.service.IPerformanceService2;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
+import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
@@ -29,13 +42,15 @@ import java.util.Map;
 public class PerformanceController2 {
 public class PerformanceController2 {
     @Autowired
     @Autowired
     private IPerformanceService2 performanceService;
     private IPerformanceService2 performanceService;
+    @Autowired
+    private UserEfficientVideoMapMapper userEfficientVideoMapMapper;
 
 
     //平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效
     //平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效
     @AutoLog(value = "平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效")
     @AutoLog(value = "平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效")
     @ApiOperation(value = "平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效", notes = "平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效")
     @ApiOperation(value = "平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效", notes = "平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效")
     @PostMapping(value = "/getPerformanceInfo")
     @PostMapping(value = "/getPerformanceInfo")
     public Result<Map<String,Object>> getPerformanceInfo() {
     public Result<Map<String,Object>> getPerformanceInfo() {
-        Result<Map<String,Object>> result = new Result<Map<String,Object>>();
+        Result<Map<String, Object>> result = new Result<>();
         Map<String,Object> resultMap = new HashMap<>();
         Map<String,Object> resultMap = new HashMap<>();
         try {
         try {
             resultMap = performanceService.getPerformanceInfo();
             resultMap = performanceService.getPerformanceInfo();
@@ -104,4 +119,316 @@ public class PerformanceController2 {
         return result;
         return result;
     }
     }
 
 
+    @AutoLog(value = "根据year、quarter计算季度设计师绩效")
+    @ApiOperation(value = "根据year、quarter计算季度设计师绩效", notes = "根据year、quarter计算季度设计师绩效")
+    @PostMapping(value = "/designerPerformance")
+    public Result<Map<String, Object>> designerPerformanceTask(@RequestParam(name = "year", required = true) int year,
+                                                               @RequestParam(name = "quarter", required = true) int quarter) {
+        Result<Map<String, Object>> result = new Result<Map<String, Object>>();
+        try {
+            performanceService.designerPerformanceTask(year, quarter);
+            result.setSuccess(true);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            log.error("/ctop/performance2/designerPerformance出错啦" + "year:" + year + " quarter:" + quarter);
+            result.error500("/ctop/performance2/designerPerformance出错啦");
+        }
+        return result;
+    }
+
+    @AutoLog(value = "有效视频定时任务")
+    @ApiOperation(value = "有效视频定时任务", notes = "calcDate传递yyyy-MM-dd格式的日期")
+    @PostMapping(value = "/efficientVideo")
+    public Result<Map<String, Object>> efficientVideo(@RequestParam(name = "calcDate", required = true) String calcDate) {
+        log.info("有效视频任务开始,有效视频所属时间为" + calcDate);
+        Result<Map<String, Object>> result = new Result<Map<String, Object>>();
+        if (StringUtils.isBlank(calcDate)) {
+            result.error500("时间不能为空");
+        }
+        try {
+            performanceService.efficientVideoTask(calcDate);
+            result.setSuccess(true);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            log.error("/ctop/performance2/efficientVideo出错啦" + "date:" + calcDate);
+            result.error500("/ctop/performance2/efficientVideo出错啦");
+        }
+        return result;
+    }
+
+    @AutoLog(value = "根据year、quarter计算kuaishou季度设计师绩效")
+    @ApiOperation(value = "根据year、quarter计算kuaishou季度设计师绩效", notes = "根据year、quarter计算kuaishou季度设计师绩效")
+    @PostMapping(value = "/toutiaoDesignerPerformance")
+    public Result<Map<String, Object>> toutiaoDesignerPerformance(@RequestParam(name = "year", required = true) int year,
+                                                                  @RequestParam(name = "quarter", required = true) int quarter) {
+        Result<Map<String, Object>> result = new Result<Map<String, Object>>();
+        try {
+            performanceService.toutiaoDesigner(year, quarter);
+            result.setSuccess(true);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            log.error("/ctop/performance2/toutiaoDesignerPerformance出错啦" + "year:" + year + " quarter:" + quarter);
+            result.error500("/ctop/performance2/toutiaoDesignerPerformance出错啦");
+        }
+        return result;
+    }
+
+    @AutoLog(value = "根据year、quarter计算toutiao季度设计师绩效")
+    @ApiOperation(value = "根据year、quarter计算toutiao季度设计师绩效", notes = "根据year、quarter计算toutiao季度设计师绩效")
+    @PostMapping(value = "/kuaishouDesignerPerformance")
+    public Result<Map<String, Object>> kuaishouDesignerPerformance(@RequestParam(name = "year", required = true) int year,
+                                                                   @RequestParam(name = "quarter", required = true) int quarter) {
+        Result<Map<String, Object>> result = new Result<Map<String, Object>>();
+        try {
+            performanceService.kuaishouDesigner(year, quarter);
+            result.setSuccess(true);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            log.error("/ctop/performance2/kuaishouDesignerPerformance出错啦" + "year:" + year + " quarter:" + quarter);
+            result.error500("/ctop/performance2/kuaishouDesignerPerformance出错啦");
+        }
+        return result;
+    }
+
+    @AutoLog(value = "获取设计师组下所有人的绩效")
+    @ApiOperation(value = "获取设计师组下所有人的绩效", notes = "获取设计师组下所有人的绩效")
+    @PostMapping(value = "/designerLastQuarterPerformanceInfo")
+    public Result<Map<String, Object>> designerLastQuarterPerformanceInfo() {
+        Result<Map<String, Object>> result = new Result<Map<String, Object>>();
+        try {
+            Map<String, Object> resultMap = performanceService.designerLastQuarterPerformanceInfo();
+            result.setResult(resultMap);
+            result.setSuccess(true);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            log.error("/ctop/performance2/designerLastQuarterPerformanceInfo出错啦");
+            result.error500("/ctop/performance2/designerLastQuarterPerformanceInfo出错啦");
+        }
+        return result;
+    }
+
+    @AutoLog(value = "获取同一媒体类型下上个季度所有人的绩效")
+    @ApiOperation(value = "获取同一媒体类型下上个季度所有人的绩效", notes = "获取同一媒体类型下上个季度所有人的绩效")
+    @PostMapping(value = "/quarterUserPerformanceList")
+    public Result<Map<String, Object>> quarterUserPerformanceList(@RequestParam(name = "appType", required = true) int appType) {
+        Result<Map<String, Object>> result = new Result<Map<String, Object>>();
+        try {
+            Map<String, Object> resultMap = performanceService.quarterUserPerformanceList(appType);
+            result.setResult(resultMap);
+            result.setSuccess(true);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            log.error("/ctop/performance2/quarterUserPerformanceList出错啦");
+            result.error500("/ctop/performance2/quarterUserPerformanceList出错啦");
+        }
+        return result;
+    }
+
+    @AutoLog(value = "获取快手上个季度的季度有效数、素材总数、上个季度的绩效")
+    @ApiOperation(value = "获取快手上个季度的季度有效数、素材总数、上个季度的绩效", notes = "获取快手上个季度的季度有效数、素材总数、上个季度的绩效")
+    @PostMapping(value = "/kuaishouDesignerLastQuarterPerformanceInfo")
+    public Result<Map<String, Object>> kuaishouDesignerLastQuarterPerformanceInfo() {
+        Result<Map<String, Object>> result = new Result<Map<String, Object>>();
+        Map<String, Object> resultMap = new HashMap<>();
+        try {
+            resultMap = performanceService.kuaishouDesignerLastQuarterPerformanceInfo();
+            result.setResult(resultMap);
+            result.setSuccess(true);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            log.error("/ctop/performance2/kuaishouDesignerLastQuarterPerformanceInfo出错啦");
+            result.error500("/ctop/performance2/kuaishouDesignerLastQuarterPerformanceInfo出错啦");
+        }
+        return result;
+    }
+
+    @AutoLog(value = "获取平面设计师上个季度的绩效")
+    @ApiOperation(value = "获取平面设计师上个季度的绩效", notes = "获取平面设计师上个季度的绩效")
+    @PostMapping(value = "/planeLastQuarterPerformanceInfo")
+    public Result<Map<String, Object>> planeLastQuarterPerformanceInfo(@RequestParam(name = "appType", required = true) int appType) {
+        Result<Map<String, Object>> result = new Result<Map<String, Object>>();
+        try {
+            Map<String, Object> resultMap = performanceService.planeLastQuarterPerformanceInfo(appType);
+            result.setResult(resultMap);
+            result.setSuccess(true);
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            log.error("/ctop/performance2/planeLastQuarterPerformanceInfo出错啦");
+            result.error500("/ctop/performance2/planeLastQuarterPerformanceInfo出错啦");
+        }
+        return result;
+    }
+
+    /**
+     * 分页列表查询
+     *
+     * @param performance
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "平面设计师季度绩效表-分页列表查询")
+    @ApiOperation(value = "平面设计师季度绩效表-分页列表查询", notes = "平面设计师季度绩效表-分页列表查询")
+    @GetMapping(value = "/planePerformanceList")
+    public Result<IPage<Performance>> planePerformanceList(Performance performance,
+                                                           @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                           @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                           HttpServletRequest req) {
+        Result<IPage<Performance>> result = new Result<IPage<Performance>>();
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        performance.setUserId(sysUser.getId());
+        QueryWrapper<Performance> queryWrapper = QueryGenerator.initQueryWrapper(performance, req.getParameterMap());
+        Page<Performance> page = new Page<Performance>(pageNo, pageSize);
+        IPage<Performance> pageList = performanceService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 分页列表查询
+     *
+     * @param performance
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "平面设计师季度绩效表-分页列表查询")
+    @ApiOperation(value = "平面设计师季度绩效表-分页列表查询", notes = "平面设计师季度绩效表-分页列表查询")
+    @GetMapping(value = "/designerDepartMemberPerformanceList")
+    public Result<IPage<Performance>> designerDepartMemberPerformanceList(Performance performance,
+                                                                          @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                          @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                          HttpServletRequest req) {
+        Result<IPage<Performance>> result = new Result<IPage<Performance>>();
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        String departId = userEfficientVideoMapMapper.getDepartIdByUserId("e9ca23d68d884d4ebb19d07889727dae");
+        List<String> userIdList = userEfficientVideoMapMapper.getUserIdListByDepId(departId);
+        //
+        QueryWrapper<Performance> queryWrapper = QueryGenerator.initQueryWrapper(performance, req.getParameterMap());
+        queryWrapper.in("user_id", userIdList);
+
+        Page<Performance> page = new Page<Performance>(pageNo, pageSize);
+        IPage<Performance> pageList = performanceService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    @AutoLog(value = "获取快手绩效时时数据接口")
+    @ApiOperation(value = "获取快手绩效时时数据接口", notes = "获取快手绩效时时数据接口")
+    @GetMapping(value = "/kuaishouPerformanceInfoNow")
+    public Result<List<UserDto2>> kuaishouPerformanceInfoNow(HttpServletRequest req) {
+        Result<List<UserDto2>> result = new Result<List<UserDto2>>();
+        List<UserDto2> userDto2List = performanceService.kuaishouPerformanceInfoNow();
+        result.setSuccess(true);
+        result.setResult(userDto2List);
+        return result;
+    }
+
+    @AutoLog(value = "获取头条绩效时时数据接口")
+    @ApiOperation(value = "获取头条绩效时时数据接口", notes = "获取头条绩效时时数据接口")
+    @GetMapping(value = "/toutiaoPererformanceInfoNow")
+    public Result<List<UserDto2>> toutiaoPererformanceInfoNow(HttpServletRequest req) {
+        Result<List<UserDto2>> result = new Result<List<UserDto2>>();
+        List<UserDto2> userDto2List = performanceService.toutiaoPerformanceInfoNow();
+        result.setSuccess(true);
+        result.setResult(userDto2List);
+        return result;
+    }
+
+    @AutoLog(value = "获取快手绩效周报表")
+    @ApiOperation(value = "获取快手绩效周报表", notes = "获取快手绩效周报表")
+    @PostMapping(value = "/kuaishouWeekReport")
+    public Result<List<UserDto2>> kuaishouWeekReport(@RequestBody PerformanceTimeDTO dto,
+                                                     HttpServletRequest req) {
+        Result<List<UserDto2>> result = new Result<List<UserDto2>>();
+        String startDate = dto.getStartDate();
+        String endDate = dto.getEndDate();
+        if(StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
+            result.setSuccess(false);
+            result.setMessage("时间不能为空");
+            return result;
+        }
+        List<UserDto2> userDto2List = performanceService.kuaishouWeekReport(startDate, endDate);
+        result.setSuccess(true);
+        result.setResult(userDto2List);
+        return result;
+    }
+
+    @AutoLog(value = "获取头条绩效周报表")
+    @ApiOperation(value = "获取头条绩效周报表", notes = "获取头条绩效周报表")
+    @PostMapping(value = "/toutiaoWeekReport")
+    public Result<List<UserDto2>> toutiaoWeekReport(@RequestBody PerformanceTimeDTO dto,
+                                                    HttpServletRequest req) {
+        Result<List<UserDto2>> result = new Result<List<UserDto2>>();
+        String startDate = dto.getStartDate();
+        String endDate = dto.getEndDate();
+        if(StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
+            result.setSuccess(false);
+            result.setMessage("时间不能为空");
+            return result;
+        }
+        List<UserDto2> userDto2List = performanceService.toutiaoWeekReport(startDate, endDate);
+        result.setSuccess(true);
+        result.setResult(userDto2List);
+        return result;
+    }
+
+    @AutoLog(value = "获取快手季度绩效报表")
+    @ApiOperation(value = "获取快手季度绩效报表", notes = "获取快手季度绩效报表")
+    @PostMapping(value = "/kuaishouQuarterReport")
+    public Result<List<UserDto2>> kuaishouQuarterReport(@RequestBody PerformanceTimeDTO dto,
+                                                        HttpServletRequest req) {
+        Result<List<UserDto2>> result = new Result<List<UserDto2>>();
+        Integer year = dto.getYear();
+        Integer quarter = dto.getQuarter();
+        if(year==null || quarter == null){
+            result.setSuccess(false);
+            result.setMessage("时间不能为空");
+        }
+        List<UserDto2> userDto2List = performanceService.kuaishouQuarterReport(year, quarter);
+        result.setSuccess(true);
+        result.setResult(userDto2List);
+        return result;
+    }
+
+    @AutoLog(value = "获取头条季度绩效报表")
+    @ApiOperation(value = "获取头条季度绩效报表", notes = "获取头条季度绩效报表")
+    @PostMapping(value = "/toutiaoQuarterReport")
+    public Result<List<UserDto2>> toutiaoQuarterReport(@RequestBody PerformanceTimeDTO dto,
+                                                       HttpServletRequest req) {
+        Result<List<UserDto2>> result = new Result<List<UserDto2>>();
+        Integer year = dto.getYear();
+        Integer quarter = dto.getQuarter();
+        if(year==null || quarter == null){
+            result.setSuccess(false);
+            result.setMessage("时间不能为空");
+        }
+        List<UserDto2> userDto2List = performanceService.toutiaoQuarterReport(year, quarter);
+        result.setSuccess(true);
+        result.setResult(userDto2List);
+        return result;
+    }
+
+    //@AutoLog(value = "获取相关有效视频列表")
+    //@ApiOperation(value = "获取相关有效视频列表", notes = "获取相关有效视频列表")
+    //@PostMapping(value = "/toutiaoQuarterReport")
+    //public Result<List<UserDto2>> getEffiVideoList(@RequestBody PerformanceTimeDTO dto,
+    //                                                   HttpServletRequest req) {
+    //    Result<List<UserDto2>> result = new Result<List<UserDto2>>();
+    //    Integer year = dto.getYear();
+    //    Integer quarter = dto.getQuarter();
+    //    if(year==null || quarter == null){
+    //        result.setSuccess(false);
+    //        result.setMessage("时间不能为空");
+    //    }
+    //    List<UserDto2> userDto2List = performanceService.toutiaoQuarterReport(year, quarter);
+    //    result.setSuccess(true);
+    //    result.setResult(userDto2List);
+    //    return result;
+    //}
+
 }
 }

+ 29 - 29
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementController.java

@@ -48,7 +48,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 
 
 /**
 /**
- * @Title: Controller
+ * @Title: controller
  * @Description: 系统通告表
  * @Description: 系统通告表
  * @Author: jeecg-boot
  * @Author: jeecg-boot
  * @Date: 2019-01-02
  * @Date: 2019-01-02
@@ -99,8 +99,8 @@ public class SysAnnouncementController {
 		result.setResult(pageList);
 		result.setResult(pageList);
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+    /**
 	  *   添加
 	  *   添加
 	 * @param sysAnnouncement
 	 * @param sysAnnouncement
 	 * @return
 	 * @return
@@ -120,8 +120,8 @@ public class SysAnnouncementController {
 		}
 		}
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+    /**
 	  *  编辑
 	  *  编辑
 	 * @param sysAnnouncement
 	 * @param sysAnnouncement
 	 * @return
 	 * @return
@@ -139,11 +139,11 @@ public class SysAnnouncementController {
 				result.success("修改成功!");
 				result.success("修改成功!");
 			}
 			}
 		}
 		}
-		
-		return result;
-	}
-	
-	/**
+
+        return result;
+    }
+
+    /**
 	  *   通过id删除
 	  *   通过id删除
 	 * @param id
 	 * @param id
 	 * @return
 	 * @return
@@ -161,11 +161,11 @@ public class SysAnnouncementController {
 				result.success("删除成功!");
 				result.success("删除成功!");
 			}
 			}
 		}
 		}
-		
-		return result;
-	}
-	
-	/**
+
+        return result;
+    }
+
+    /**
 	  *  批量删除
 	  *  批量删除
 	 * @param ids
 	 * @param ids
 	 * @return
 	 * @return
@@ -186,8 +186,8 @@ public class SysAnnouncementController {
 		}
 		}
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+    /**
 	  * 通过id查询
 	  * 通过id查询
 	 * @param id
 	 * @param id
 	 * @return
 	 * @return
@@ -204,8 +204,8 @@ public class SysAnnouncementController {
 		}
 		}
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+    /**
 	 *	 更新发布操作
 	 *	 更新发布操作
 	 * @param id
 	 * @param id
 	 * @return
 	 * @return
@@ -227,11 +227,11 @@ public class SysAnnouncementController {
 				result.success("该系统通知发布成功");
 				result.success("该系统通知发布成功");
 			}
 			}
 		}
 		}
-		
-		return result;
-	}
-	
-	/**
+
+        return result;
+    }
+
+    /**
 	 *	 更新撤销操作
 	 *	 更新撤销操作
 	 * @param id
 	 * @param id
 	 * @return
 	 * @return
@@ -251,11 +251,11 @@ public class SysAnnouncementController {
 				result.success("该系统通知撤销成功");
 				result.success("该系统通知撤销成功");
 			}
 			}
 		}
 		}
-		
-		return result;
-	}
-	
-	/**
+
+        return result;
+    }
+
+    /**
 	 * @功能:补充用户数据,并返回系统消息
 	 * @功能:补充用户数据,并返回系统消息
 	 * @return
 	 * @return
 	 */
 	 */

+ 23 - 23
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysAnnouncementSendController.java

@@ -33,7 +33,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 
 
  /**
  /**
- * @Title: Controller
+  * @Title: controller
  * @Description: 用户通告阅读标记表
  * @Description: 用户通告阅读标记表
  * @Author: jeecg-boot
  * @Author: jeecg-boot
  * @Date:  2019-02-21
  * @Date:  2019-02-21
@@ -45,8 +45,8 @@ import lombok.extern.slf4j.Slf4j;
 public class SysAnnouncementSendController {
 public class SysAnnouncementSendController {
 	@Autowired
 	@Autowired
 	private ISysAnnouncementSendService sysAnnouncementSendService;
 	private ISysAnnouncementSendService sysAnnouncementSendService;
-	
-	/**
+
+     /**
 	  * 分页列表查询
 	  * 分页列表查询
 	 * @param sysAnnouncementSend
 	 * @param sysAnnouncementSend
 	 * @param pageNo
 	 * @param pageNo
@@ -81,8 +81,8 @@ public class SysAnnouncementSendController {
 		result.setResult(pageList);
 		result.setResult(pageList);
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+     /**
 	  *   添加
 	  *   添加
 	 * @param sysAnnouncementSend
 	 * @param sysAnnouncementSend
 	 * @return
 	 * @return
@@ -99,8 +99,8 @@ public class SysAnnouncementSendController {
 		}
 		}
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+     /**
 	  *  编辑
 	  *  编辑
 	 * @param sysAnnouncementSend
 	 * @param sysAnnouncementSend
 	 * @return
 	 * @return
@@ -118,11 +118,11 @@ public class SysAnnouncementSendController {
 				result.success("修改成功!");
 				result.success("修改成功!");
 			}
 			}
 		}
 		}
-		
-		return result;
-	}
-	
-	/**
+
+        return result;
+    }
+
+     /**
 	  *   通过id删除
 	  *   通过id删除
 	 * @param id
 	 * @param id
 	 * @return
 	 * @return
@@ -139,11 +139,11 @@ public class SysAnnouncementSendController {
 				result.success("删除成功!");
 				result.success("删除成功!");
 			}
 			}
 		}
 		}
-		
-		return result;
-	}
-	
-	/**
+
+        return result;
+    }
+
+     /**
 	  *  批量删除
 	  *  批量删除
 	 * @param ids
 	 * @param ids
 	 * @return
 	 * @return
@@ -159,8 +159,8 @@ public class SysAnnouncementSendController {
 		}
 		}
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+     /**
 	  * 通过id查询
 	  * 通过id查询
 	 * @param id
 	 * @param id
 	 * @return
 	 * @return
@@ -177,8 +177,8 @@ public class SysAnnouncementSendController {
 		}
 		}
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+     /**
 	 * @功能:更新用户系统消息阅读状态
 	 * @功能:更新用户系统消息阅读状态
 	 * @param json
 	 * @param json
 	 * @return
 	 * @return
@@ -198,8 +198,8 @@ public class SysAnnouncementSendController {
 		result.setSuccess(true);
 		result.setSuccess(true);
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+     /**
 	 * @功能:获取我的消息
 	 * @功能:获取我的消息
 	 * @return
 	 * @return
 	 */
 	 */

+ 21 - 21
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserAgentController.java

@@ -49,7 +49,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 
 
  /**
  /**
- * @Title: Controller
+  * @Title: controller
  * @Description: 用户代理人设置
  * @Description: 用户代理人设置
  * @Author: jeecg-boot
  * @Author: jeecg-boot
  * @Date:  2019-04-17
  * @Date:  2019-04-17
@@ -61,8 +61,8 @@ import lombok.extern.slf4j.Slf4j;
 public class SysUserAgentController {
 public class SysUserAgentController {
 	@Autowired
 	@Autowired
 	private ISysUserAgentService sysUserAgentService;
 	private ISysUserAgentService sysUserAgentService;
-	
-	/**
+
+     /**
 	  * 分页列表查询
 	  * 分页列表查询
 	 * @param sysUserAgent
 	 * @param sysUserAgent
 	 * @param pageNo
 	 * @param pageNo
@@ -83,8 +83,8 @@ public class SysUserAgentController {
 		result.setResult(pageList);
 		result.setResult(pageList);
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+     /**
 	  *   添加
 	  *   添加
 	 * @param sysUserAgent
 	 * @param sysUserAgent
 	 * @return
 	 * @return
@@ -101,8 +101,8 @@ public class SysUserAgentController {
 		}
 		}
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+     /**
 	  *  编辑
 	  *  编辑
 	 * @param sysUserAgent
 	 * @param sysUserAgent
 	 * @return
 	 * @return
@@ -120,11 +120,11 @@ public class SysUserAgentController {
 				result.success("代理人设置成功!");
 				result.success("代理人设置成功!");
 			}
 			}
 		}
 		}
-		
-		return result;
-	}
-	
-	/**
+
+        return result;
+    }
+
+     /**
 	  *   通过id删除
 	  *   通过id删除
 	 * @param id
 	 * @param id
 	 * @return
 	 * @return
@@ -141,11 +141,11 @@ public class SysUserAgentController {
 				result.success("删除成功!");
 				result.success("删除成功!");
 			}
 			}
 		}
 		}
-		
-		return result;
-	}
-	
-	/**
+
+        return result;
+    }
+
+     /**
 	  *  批量删除
 	  *  批量删除
 	 * @param ids
 	 * @param ids
 	 * @return
 	 * @return
@@ -161,8 +161,8 @@ public class SysUserAgentController {
 		}
 		}
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+     /**
 	  * 通过id查询
 	  * 通过id查询
 	 * @param id
 	 * @param id
 	 * @return
 	 * @return
@@ -179,8 +179,8 @@ public class SysUserAgentController {
 		}
 		}
 		return result;
 		return result;
 	}
 	}
-	
-	/**
+
+     /**
 	  * 通过userName查询
 	  * 通过userName查询
 	 * @param userName
 	 * @param userName
 	 * @return
 	 * @return

+ 1 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysRoleMapper.xml

@@ -13,6 +13,7 @@
 		sys_user a
 		sys_user a
 		left join sys_user_role b on a.id = b.user_id
 		left join sys_user_role b on a.id = b.user_id
 		left join sys_role c on b.role_id = c.id
 		left join sys_role c on b.role_id = c.id
+		left join sys_
         where
         where
         c.role_code = #{roleCode}
         c.role_code = #{roleCode}
 	</select>
 	</select>

+ 65 - 8
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/IPerformanceService2.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.system.service;
 
 
 import cn.com.ctop.performanceappraisal.entity.Performance;
 import cn.com.ctop.performanceappraisal.entity.Performance;
 import cn.com.ctop.userefficientvideomap.entity.DesignMaterialInfo;
 import cn.com.ctop.userefficientvideomap.entity.DesignMaterialInfo;
+import cn.com.ctop.userefficientvideomap.entity.UserDto2;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 
 import java.util.List;
 import java.util.List;
@@ -15,17 +16,73 @@ import java.util.Map;
  * @date 2019-12-10
  * @date 2019-12-10
  */
  */
 public interface IPerformanceService2 extends IService<Performance> {
 public interface IPerformanceService2 extends IService<Performance> {
+    /**
+     * 查询统计有效视频
+     *
+     * @param calcDateStr
+     */
     void efficientVideoTask(String calcDateStr);
     void efficientVideoTask(String calcDateStr);
 
 
-    //平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效
-    public Map<String,Object> getPerformanceInfo();
+    /**
+     * 平台的总有效数量、素材总数、素材有效率、总跑量、当前可获得绩效
+     *
+     * @return
+     */
+    Map<String, Object> getPerformanceInfo();
 
 
-    //有效率排行榜
-    public Map<String,Object> effiRateRank(Integer size);
+    /**
+     * 有效率排行榜
+     *
+     * @param size
+     * @return
+     */
+    Map<String, Object> effiRateRank(Integer size);
 
 
-    //素材、素材跑量、封面点击数、封面曝光数、行为数
-    public List<DesignMaterialInfo> materialInfoList();
+    /**
+     * 素材、素材跑量、封面点击数、封面曝光数、行为数
+     *
+     * @return
+     */
+    List<DesignMaterialInfo> materialInfoList();
+
+    /**
+     * 点击+符号 投放账户、投放账户、跑量
+     *
+     * @param materialInfoId
+     * @return
+     */
+    List<DesignMaterialInfo> materialAccountInfo(String materialInfoId);
+
+    void designerPerformanceTask(int year, int quarter);
+
+    void kuaishouDesigner(int thisYear, int thisQuarter);
+
+    void toutiaoDesigner(int thisYear, int thisQuarter);
+
+    Map<String, Object> designerLastQuarterPerformanceInfo();
+
+    Map<String, Object> quarterUserPerformanceList(Integer appType);
+
+    Map<String, Object> kuaishouDesignerLastQuarterPerformanceInfo();
+
+    Map<String, Object> planeLastQuarterPerformanceInfo(int appType);
+
+    //获取快手绩效时时数据接口
+    List<UserDto2> kuaishouPerformanceInfoNow();
+
+    //获取快手绩效时时数据接口
+    List<UserDto2> toutiaoPerformanceInfoNow();
+
+    //获取快手绩效周报表
+    List<UserDto2> kuaishouWeekReport(String startDate, String endDate);
+
+    //获取头条绩效周报表
+    List<UserDto2> toutiaoWeekReport(String startDate, String endDate);
+
+    //获取快手季度绩效报表
+    List<UserDto2> kuaishouQuarterReport(Integer year, Integer quarter);
+
+    //获取头条季度绩效报表
+    List<UserDto2> toutiaoQuarterReport(Integer year, Integer quarter);
 
 
-    //点击+符号 投放账户、投放账户、跑量
-    public List<DesignMaterialInfo> materialAccountInfo(String materialInfoId);
 }
 }

文件差异内容过多而无法显示
+ 1410 - 346
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/PerformanceServiceImpl2.java


+ 6 - 0
jeecg-boot-module-system/src/main/resources/application.yml

@@ -1,6 +1,12 @@
 spring:
 spring:
   profiles:
   profiles:
     active: @activatedProperties@
     active: @activatedProperties@
+  application:
+    name: system-web
+eureka:
+  client:
+    serviceUrl:
+      defaultZone: http://localhost:8761/eureka/
 swagger:
 swagger:
   production: false
   production: false
   basic:
   basic:

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

@@ -55,9 +55,9 @@ public class SampleTest {
             log.info("定时获取头条数据异常:为获取到可用的token");
             log.info("定时获取头条数据异常:为获取到可用的token");
             return;
             return;
         }
         }
-        tokens.forEach(token -> {
-            reportService.getAdvertiserPlanReport(token,getDate,getDate,CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
-        });
+//        tokens.forEach(token -> {
+//            reportService.getAdvertiserPlanReport(token,getDate,getDate,CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+//        });
 
 
         //清洗关于缘多多数据
         //清洗关于缘多多数据
         //1:查询缘多多相关的用户数据
         //1:查询缘多多相关的用户数据

+ 118 - 0
log-server/.mvn/wrapper/MavenWrapperDownloader.java

@@ -0,0 +1,118 @@
+/*
+ * Copyright 2007-present the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.net.*;
+import java.io.*;
+import java.nio.channels.*;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+    private static final String WRAPPER_VERSION = "0.5.6";
+    /**
+     * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+     */
+    private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+            + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
+
+    /**
+     * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+     * use instead of the default one.
+     */
+    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+            ".mvn/wrapper/maven-wrapper.properties";
+
+    /**
+     * Path where the maven-wrapper.jar will be saved to.
+     */
+    private static final String MAVEN_WRAPPER_JAR_PATH =
+            ".mvn/wrapper/maven-wrapper.jar";
+
+    /**
+     * Name of the property which should be used to override the default download url for the wrapper.
+     */
+    private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+    public static void main(String args[]) {
+        System.out.println("- Downloader started");
+        File baseDirectory = new File(args[0]);
+        System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+        // If the maven-wrapper.properties exists, read it and check if it contains a custom
+        // wrapperUrl parameter.
+        File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+        String url = DEFAULT_DOWNLOAD_URL;
+        if (mavenWrapperPropertyFile.exists()) {
+            FileInputStream mavenWrapperPropertyFileInputStream = null;
+            try {
+                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+                Properties mavenWrapperProperties = new Properties();
+                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+            } catch (IOException e) {
+                System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+            } finally {
+                try {
+                    if (mavenWrapperPropertyFileInputStream != null) {
+                        mavenWrapperPropertyFileInputStream.close();
+                    }
+                } catch (IOException e) {
+                    // Ignore ...
+                }
+            }
+        }
+        System.out.println("- Downloading from: " + url);
+
+        File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+        if (!outputFile.getParentFile().exists()) {
+            if (!outputFile.getParentFile().mkdirs()) {
+                System.out.println(
+                        "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+            }
+        }
+        System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+        try {
+            downloadFileFromURL(url, outputFile);
+            System.out.println("Done");
+            System.exit(0);
+        } catch (Throwable e) {
+            System.out.println("- Error downloading");
+            e.printStackTrace();
+            System.exit(1);
+        }
+    }
+
+    private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+        if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
+            String username = System.getenv("MVNW_USERNAME");
+            char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
+            Authenticator.setDefault(new Authenticator() {
+                @Override
+                protected PasswordAuthentication getPasswordAuthentication() {
+                    return new PasswordAuthentication(username, password);
+                }
+            });
+        }
+        URL website = new URL(urlString);
+        ReadableByteChannel rbc;
+        rbc = Channels.newChannel(website.openStream());
+        FileOutputStream fos = new FileOutputStream(destination);
+        fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+        fos.close();
+        rbc.close();
+    }
+
+}

二进制
log-server/.mvn/wrapper/maven-wrapper.jar


+ 2 - 0
log-server/.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

+ 376 - 0
log-server/pom.xml

@@ -0,0 +1,376 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.2.RELEASE</version>
+        <relativePath/>
+    </parent>
+    <groupId>cn.com.ctop</groupId>
+    <artifactId>log-server</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>log-server</name>
+    <description>Demo project for Spring Boot</description>
+
+    <properties>
+        <java.version>1.8</java.version>
+        <spring-cloud.version>Hoxton.SR1</spring-cloud.version>
+        <jeecgboot.common.version>2.0.2</jeecgboot.common.version>
+        <java.version>1.8</java.version>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <mybatis-plus.version>3.0.6</mybatis-plus.version>
+        <druid.version>1.1.10</druid.version>
+        <commons.version>2.6</commons.version>
+        <aliyun-java-sdk-core.version>3.5.0</aliyun-java-sdk-core.version>
+        <aliyun-java-sdk-dysmsapi.version>1.0.0</aliyun-java-sdk-dysmsapi.version>
+    </properties>
+
+    <dependencies>
+
+        <!--集成springmvc框架并实现自动配置 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>ch.qos.logback</groupId>
+                    <artifactId>logback-classic</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-mail</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+        <!-- <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <optional>true</optional>
+        </dependency> -->
+
+        <!-- commons -->
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${commons.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>${commons.version}</version>
+        </dependency>
+
+        <!-- freemarker -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-freemarker</artifactId>
+        </dependency>
+
+        <!-- Lombok -->
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+
+        <!-- mybatis-plus -->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>${mybatis-plus.version}</version>
+        </dependency>
+
+        <!-- druid -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>${druid.version}</version>
+        </dependency>
+
+        <!-- 动态数据源 -->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+            <version>2.5.4</version>
+        </dependency>
+
+        <!-- json -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.56</version>
+        </dependency>
+
+        <!--mysql-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>5.1.47</version>
+            <scope>runtime</scope>
+        </dependency>
+        <!--sqlserver-->
+        <dependency>
+            <groupId>net.sourceforge.jtds</groupId>
+            <artifactId>jtds</artifactId>
+            <version>1.3.1</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.microsoft.sqlserver</groupId>
+            <artifactId>mssql-jdbc</artifactId>
+            <version>7.2.1.jre8</version>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!-- Quartz定时任务 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-quartz</artifactId>
+        </dependency>
+
+        <!--JWT-->
+        <dependency>
+            <groupId>com.auth0</groupId>
+            <artifactId>java-jwt</artifactId>
+            <version>3.7.0</version>
+        </dependency>
+
+        <!--shiro-->
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-spring-boot-starter</artifactId>
+            <version>1.4.0</version>
+        </dependency>
+
+        <!-- Swagger API文档 -->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>swagger-bootstrap-ui</artifactId>
+            <version>1.9.3</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-bean-validators</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+
+
+        <!-- Redis -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+        </dependency>
+
+        <!-- 代码生成器 -->
+
+        <!-- AutoPoi Excel工具类-->
+        <dependency>
+            <groupId>org.jeecgframework</groupId>
+            <artifactId>autopoi-web</artifactId>
+            <version>1.0.3</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-codec</groupId>
+                    <artifactId>commons-codec</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.9</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>4.4</version>
+        </dependency>
+        <dependency>
+            <groupId>com.squareup.retrofit2</groupId>
+            <artifactId>retrofit</artifactId>
+            <version>2.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.pdfbox</groupId>
+            <artifactId>fontbox</artifactId>
+            <version>2.0.15</version>
+        </dependency>
+        <dependency>
+            <groupId>org.seleniumhq.selenium</groupId>
+            <artifactId>selenium-java</artifactId>
+            <version>3.141.59</version>
+        </dependency>
+        <dependency>
+            <groupId>org.seleniumhq.selenium</groupId>
+            <artifactId>selenium-firefox-driver</artifactId>
+            <version>3.141.59</version>
+        </dependency>
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+            <version>LATEST</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>25.0-jre</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-cp</artifactId>
+            <version>3.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>us.codecraft</groupId>
+            <artifactId>webmagic-core</artifactId>
+            <version>0.7.3</version>
+        </dependency>
+        <dependency>
+            <groupId>us.codecraft</groupId>
+            <artifactId>webmagic-extension</artifactId>
+            <version>0.7.3</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sourceforge.htmlunit</groupId>
+            <artifactId>htmlunit</artifactId>
+            <version>2.36.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.appium</groupId>
+            <artifactId>java-client</artifactId>
+            <version>7.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>1.11</version>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>4.5.11</version>
+        </dependency>
+
+        <!-- 阿里云短信 -->
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
+            <version>${aliyun-java-sdk-dysmsapi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+            <version>${aliyun-java-sdk-core.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>2.8.3</version>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-mts</artifactId>
+            <version>2.5.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.junit.vintage</groupId>
+                    <artifactId>junit-vintage-engine</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.jeecgframework.boot</groupId>
+                <artifactId>jeecg-boot-base-common</artifactId>
+                <version>${jeecgboot.common.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>${spring-cloud.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>dev</id>
+            <properties>
+                <!-- 环境标识,需要与配置文件的名称相对应 -->
+                <activatedProperties>dev</activatedProperties>
+            </properties>
+            <activation>
+                <!-- 默认环境 -->
+                <activeByDefault>true</activeByDefault>
+            </activation>
+        </profile>
+        <profile>
+            <id>test</id>
+            <properties>
+                <activatedProperties>test</activatedProperties>
+            </properties>
+        </profile>
+        <profile>
+            <id>prod</id>
+            <properties>
+                <activatedProperties>prod</activatedProperties>
+            </properties>
+        </profile>
+    </profiles>
+</project>

+ 13 - 0
log-server/src/main/java/cn/com/ctop/logserver/LogServerApplication.java

@@ -0,0 +1,13 @@
+package cn.com.ctop.logserver;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+
+@SpringBootApplication
+@EnableEurekaClient
+public class LogServerApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(LogServerApplication.class, args);
+    }
+}

+ 17 - 0
log-server/src/main/java/cn/com/ctop/logserver/controller/LogController.java

@@ -0,0 +1,17 @@
+package cn.com.ctop.logserver.controller;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class LogController {
+    @Value("${server.port}")
+    String port;
+
+    @GetMapping("hi")
+    public String home(@RequestParam(value = "name", defaultValue = "forezp") String name) {
+        return "hi " + name + " ,i am from port:" + port;
+    }
+}

+ 160 - 0
log-server/src/main/resources/application-dev.yml

@@ -0,0 +1,160 @@
+server:
+  port: 8080
+  servlet:
+    context-path: /jeecg-boot
+    compression:
+      enabled: true
+      mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: metrics,httptrace
+
+spring:
+  rabbitmq:
+    host: 39.106.184.70
+    port: 5672
+    username: guest
+    password: guest
+  servlet:
+    multipart:
+      max-file-size: -1
+      max-request-size: -1
+  mail:
+    host: smtp.163.com
+    username: jeecgos@163.com
+    password: ??
+    properties:
+      mail:
+        smtp:
+          auth: true
+          starttls:
+            enable: true
+            required: true
+  ## quartz定时任务,采用数据库方式
+  quartz:
+    job-store-type: jdbc
+  #json 时间戳统一转换
+  jackson:
+    date-format:   yyyy-MM-dd HH:mm:ss
+    time-zone:   GMT+8
+  aop:
+    proxy-target-class: true
+  #配置freemarker
+  freemarker:
+    # 设置模板后缀名
+    suffix: .ftl
+    # 设置文档类型
+    content-type: text/html
+    # 设置页面编码格式
+    charset: UTF-8
+    # 设置页面缓存
+    cache: false
+    prefer-file-system-access: false
+    # 设置ftl文件路径
+    template-loader-path:
+      - classpath:/templates
+  # 设置静态文件路径,js,css等
+  mvc:
+    static-path-pattern: /**
+  resource:
+    static-locations: classpath:/static/,classpath:/public/
+  autoconfigure:
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
+  datasource:
+    druid:
+      stat-view-servlet:
+        enabled: true
+        loginUsername: admin
+        loginPassword: 123456
+      web-stat-filter:
+        enabled: true
+    dynamic:
+      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        connection-init-sql: set names utf8mb4
+
+        initial-size: 5
+        min-idle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters: stat,wall,slf4j
+        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
+      datasource:
+        master:
+          url: jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+          username: root
+          password: hcst2019
+          driver-class-name: com.mysql.jdbc.Driver
+          # 多数据源配置
+          #multi-datasource1:
+          #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
+          #username: root
+          #password: root
+          #driver-class-name: com.mysql.jdbc.Driver
+  #redis 配置
+  redis:
+    database: 0
+    host: 127.0.0.1
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
+    password: ''
+    port: 6379
+#mybatis plus 设置
+mybatis-plus:
+  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:cn/com/ctop/**/xml/*Mapper.xml
+  global-config:
+    # 关闭MP3.0自带的banner
+    banner: false
+    db-config:
+      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
+      id-type: 4
+      # 默认数据库表下划线命名
+      table-underline: true
+    configuration:
+      # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
+      log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+#jeecg专用配置
+jeecg:
+  path:
+    #文件上传根目录 设置
+    upload: D://upFiles
+    #webapp文件路径
+    webapp: D://webapp
+    video-upload: D://upFiles//video//
+    image-upload: D://upFiles//image//
+    chrome-driver: D://chromedriver.exe
+    csv-upload: D://upFiles//csv//
+kuaishou:
+  group-control:
+    path: http://39.106.184.70
+    port: 4723
+logging:
+  level:
+    root: info
+  config: classpath:logback-dev.xml
+chrome:
+  script:
+    clean: sh /mnt/webapp/cleanProcess.sh

+ 159 - 0
log-server/src/main/resources/application-prod.yml

@@ -0,0 +1,159 @@
+server:
+  port: 8080
+  servlet:
+    context-path: /jeecg-boot
+    compression:
+      enabled: true
+      mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: metrics,httptrace
+
+
+spring:
+  rabbitmq:
+    host: 39.106.184.70
+    port: 5672
+    username: guest
+    password: guest
+  servlet:
+    multipart:
+      max-file-size: -1
+      max-request-size: -1
+  mail:
+    host: smtp.163.com
+    username: jeecgos@163.com
+    password: ??
+    properties:
+      mail:
+        smtp:
+          auth: true
+          starttls:
+            enable: true
+            required: true
+  ## quartz定时任务,采用数据库方式
+  quartz:
+    job-store-type: jdbc
+  #json 时间戳统一转换
+  jackson:
+    date-format:   yyyy-MM-dd HH:mm:ss
+    time-zone:   GMT+8
+  aop:
+    proxy-target-class: true
+  #配置freemarker
+  freemarker:
+    # 设置模板后缀名
+    suffix: .ftl
+    # 设置文档类型
+    content-type: text/html
+    # 设置页面编码格式
+    charset: UTF-8
+    # 设置页面缓存
+    cache: false
+    prefer-file-system-access: false
+    # 设置ftl文件路径
+    template-loader-path:
+      - classpath:/templates
+  # 设置静态文件路径,js,css等
+  mvc:
+    static-path-pattern: /**
+  resource:
+    static-locations: classpath:/static/,classpath:/public/
+  autoconfigure:
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
+  datasource:
+    druid:
+      stat-view-servlet:
+        loginUsername: admin
+        loginPassword: hcst2016
+        enabled: true
+      web-stat-filter:
+        enabled: true
+    #      remove-abandoned: false
+    dynamic:
+      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        connection-init-sql: set names utf8mb4
+        initial-size: 5
+        min-idle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters: stat,wall,slf4j
+        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
+      datasource:
+        master:
+          url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+          username: hcst
+          password: test@20190531
+          driver-class-name: com.mysql.jdbc.Driver
+          # 多数据源配置
+          #multi-datasource1:
+          #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
+          #username: root
+          #password: root
+          #driver-class-name: com.mysql.jdbc.Driver
+  #redis 配置
+  redis:
+    database: 0
+    host: 127.0.0.1
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
+    password: ''
+    port: 6379
+#mybatis plus 设置
+mybatis-plus:
+  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:cn/com/ctop/**/xml/*Mapper.xml
+  global-config:
+    # 关闭MP3.0自带的banner
+    banner: false
+    db-config:
+      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
+      id-type: 4
+      # 默认数据库表下划线命名
+      table-underline: true
+#jeecg专用配置
+jeecg:
+  path:
+    #文件上传根目录 设置
+    upload: /mnt/upload
+    #webapp文件路径
+    webapp: /mnt/webapp
+    video-upload: /mnt/upload/video/
+    image-upload: /mnt/upload/image/
+    chrome-driver: /usr/bin/chromedriver
+    csv-upload: /mnt/upload/csv/
+kuaishou:
+  group-control:
+    path: http://39.106.184.70
+    port: 4723
+logging:
+  level:
+    root: info
+  config: classpath:logback-prod.xml
+chrome:
+  script:
+    clean: sh /mnt/webapp/cleanProcess.sh
+

+ 161 - 0
log-server/src/main/resources/application-test.yml

@@ -0,0 +1,161 @@
+server:
+  port: 8080
+  servlet:
+    context-path: /jeecg-boot
+    compression:
+      enabled: true
+      mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: metrics,httptrace
+
+spring:
+  rabbitmq:
+    host: 127.0.0.1
+    port: 5672
+    username: guest
+    password: guest
+  servlet:
+    multipart:
+      max-file-size: -1
+      max-request-size: -1
+  mail:
+    host: smtp.163.com
+    username: jeecgos@163.com
+    password: ??
+    properties:
+      mail:
+        smtp:
+          auth: true
+          starttls:
+            enable: true
+            required: true
+  ## quartz定时任务,采用数据库方式
+  quartz:
+    job-store-type: jdbc
+  #json 时间戳统一转换
+  jackson:
+    date-format:   yyyy-MM-dd HH:mm:ss
+    time-zone:   GMT+8
+  aop:
+    proxy-target-class: true
+  #配置freemarker
+  freemarker:
+    # 设置模板后缀名
+    suffix: .ftl
+    # 设置文档类型
+    content-type: text/html
+    # 设置页面编码格式
+    charset: UTF-8
+    # 设置页面缓存
+    cache: false
+    prefer-file-system-access: false
+    # 设置ftl文件路径
+    template-loader-path:
+      - classpath:/templates
+  # 设置静态文件路径,js,css等
+  mvc:
+    static-path-pattern: /**
+  resource:
+    static-locations: classpath:/static/,classpath:/public/
+  autoconfigure:
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
+  datasource:
+    druid:
+      stat-view-servlet:
+        enabled: true
+        loginUsername: admin
+        loginPassword: 123456
+      web-stat-filter:
+        enabled: true
+    dynamic:
+      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
+        # 连接池的配置信息
+        # 初始化大小,最小,最大
+        connection-init-sql: set names utf8mb4
+
+        initial-size: 5
+        min-idle: 5
+        maxActive: 20
+        # 配置获取连接等待超时的时间
+        maxWait: 60000
+        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+        timeBetweenEvictionRunsMillis: 60000
+        # 配置一个连接在池中最小生存的时间,单位是毫秒
+        minEvictableIdleTimeMillis: 300000
+        validationQuery: SELECT 1 FROM DUAL
+        testWhileIdle: true
+        testOnBorrow: false
+        testOnReturn: false
+        # 打开PSCache,并且指定每个连接上PSCache的大小
+        poolPreparedStatements: true
+        maxPoolPreparedStatementPerConnectionSize: 20
+        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+        filters: stat,wall,slf4j
+        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
+      datasource:
+        master:
+          url: jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+          username: root
+          password: hcst2019
+          driver-class-name: com.mysql.jdbc.Driver
+          # 多数据源配置
+          #multi-datasource1:
+          #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
+          #username: root
+          #password: root
+          #driver-class-name: com.mysql.jdbc.Driver
+  #redis 配置
+  redis:
+    database: 0
+    host: 127.0.0.1
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
+    password: ''
+    port: 6379
+#mybatis plus 设置
+mybatis-plus:
+  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:cn/com/ctop/**/xml/*Mapper.xml
+  global-config:
+    # 关闭MP3.0自带的banner
+    banner: false
+    db-config:
+      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
+      id-type: 4
+      # 默认数据库表下划线命名
+      table-underline: true
+    configuration:
+      # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
+      log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+#jeecg专用配置
+jeecg:
+  path:
+    #文件上传根目录 设置
+    #文件上传根目录 设置
+    upload: /data/upload
+    #webapp文件路径
+    webapp: /data/webapp
+    video-upload: /data/upload/video/
+    image-upload: /data/upload/image/
+    chrome-driver: /usr/bin/chromedriver
+    csv-upload: /data/upload/csv/
+kuaishou:
+  group-control:
+    path: http://127.0.0.1
+    port: 4723
+logging:
+  level:
+    root: info
+  config: classpath:logback-test.xml
+chrome:
+  script:
+    clean: sh /mnt/webapp/cleanProcess.sh

+ 15 - 0
log-server/src/main/resources/application.yml

@@ -0,0 +1,15 @@
+spring:
+  profiles:
+    active: @activatedProperties@
+  application:
+    name: system-web
+eureka:
+  client:
+    serviceUrl:
+      defaultZone: http://localhost:8761/eureka/
+swagger:
+  production: false
+  basic:
+    enable: true
+    username: jeecg
+    password: jeecg1314

+ 14 - 0
log-server/src/main/resources/banner.txt

@@ -0,0 +1,14 @@
+
+${AnsiColor.BRIGHT_BLUE}
+   (_)                          | |               | |
+    _  ___  ___  ___ __ _ ______| |__   ___   ___ | |_ 
+   | |/ _ \/ _ \/ __/ _` |______| '_ \ / _ \ / _ \| __|
+   | |  __/  __/ (_| (_| |      | |_) | (_) | (_) | |_ 
+   | |\___|\___|\___\__, |      |_.__/ \___/ \___/ \__|
+  _/ |               __/ |                             
+ |__/               |___/
+
+${AnsiColor.BRIGHT_GREEN}
+Jeecg  Boot Version: 2.0.2
+Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
+${AnsiColor.BLACK}

+ 4 - 0
log-server/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

+ 57 - 0
log-server/src/main/resources/logback-dev.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="10 seconds">
+
+    <contextName>logback</contextName>
+
+
+    <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
+    <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"/>
+
+    <!-- 定义日志存储的路径,不要配置相对路径 -->
+    <property name="FILE_PATH" value="D:/Desktop/log/spring-log.%d{yyyy-MM-dd}.%i.log"/>
+
+    <!-- 控制台输出日志 -->
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <!-- 日志级别过滤INFO以下 -->
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>INFO</level>
+        </filter>
+        <encoder>
+            <!-- 按照上面配置的LOG_PATTERN来打印日志 -->
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!--每天生成一个日志文件,保存30天的日志文件。rollingFile用来切分文件的 -->
+    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+
+            <fileNamePattern>${FILE_PATH}</fileNamePattern>
+
+            <!-- keep 15 days' worth of history -->
+            <maxHistory>30</maxHistory>
+
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <!-- 日志文件的最大大小 -->
+                <maxFileSize>2MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+
+            <!-- 超出删除老文件 -->
+            <totalSizeCap>1GB</totalSizeCap>
+        </rollingPolicy>
+
+        <encoder>
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!-- project default level -->
+    <logger name="net.sh.rgface.serive" level="ERROR"/>
+
+    <!-- 日志输出级别 -->
+    <root level="INFO">
+        <appender-ref ref="console"/>
+        <appender-ref ref="rollingFile"/>
+    </root>
+</configuration>

+ 57 - 0
log-server/src/main/resources/logback-prod.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="10 seconds">
+
+    <contextName>logback</contextName>
+
+
+    <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
+    <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"/>
+
+    <!-- 定义日志存储的路径,不要配置相对路径 -->
+    <property name="FILE_PATH" value="/mnt/webapps/logs/spring-log.%d{yyyy-MM-dd}.%i.log"/>
+
+    <!-- 控制台输出日志 -->
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <!-- 日志级别过滤INFO以下 -->
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>INFO</level>
+        </filter>
+        <encoder>
+            <!-- 按照上面配置的LOG_PATTERN来打印日志 -->
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!--每天生成一个日志文件,保存30天的日志文件。rollingFile用来切分文件的 -->
+    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+
+            <fileNamePattern>${FILE_PATH}</fileNamePattern>
+
+            <!-- keep 15 days' worth of history -->
+            <maxHistory>30</maxHistory>
+
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <!-- 日志文件的最大大小 -->
+                <maxFileSize>2MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+
+            <!-- 超出删除老文件 -->
+            <totalSizeCap>1GB</totalSizeCap>
+        </rollingPolicy>
+
+        <encoder>
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!-- project default level -->
+    <logger name="net.sh.rgface.serive" level="ERROR"/>
+
+    <!-- 日志输出级别 -->
+    <root level="INFO">
+        <appender-ref ref="console"/>
+        <appender-ref ref="rollingFile"/>
+    </root>
+</configuration>

+ 57 - 0
log-server/src/main/resources/logback-test.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration scan="true" scanPeriod="10 seconds">
+
+    <contextName>logback</contextName>
+
+
+    <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
+    <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"/>
+
+    <!-- 定义日志存储的路径,不要配置相对路径 -->
+    <property name="FILE_PATH" value="/data/webapp/log/spring-log.%d{yyyy-MM-dd}.%i.log"/>
+
+    <!-- 控制台输出日志 -->
+    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
+        <!-- 日志级别过滤INFO以下 -->
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+            <level>INFO</level>
+        </filter>
+        <encoder>
+            <!-- 按照上面配置的LOG_PATTERN来打印日志 -->
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!--每天生成一个日志文件,保存30天的日志文件。rollingFile用来切分文件的 -->
+    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
+
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+
+            <fileNamePattern>${FILE_PATH}</fileNamePattern>
+
+            <!-- keep 15 days' worth of history -->
+            <maxHistory>30</maxHistory>
+
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <!-- 日志文件的最大大小 -->
+                <maxFileSize>2MB</maxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+
+            <!-- 超出删除老文件 -->
+            <totalSizeCap>1GB</totalSizeCap>
+        </rollingPolicy>
+
+        <encoder>
+            <pattern>${LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+
+    <!-- project default level -->
+    <logger name="net.sh.rgface.serive" level="ERROR"/>
+
+    <!-- 日志输出级别 -->
+    <root level="INFO">
+        <appender-ref ref="console"/>
+        <appender-ref ref="rollingFile"/>
+    </root>
+</configuration>

+ 6 - 0
log-server/src/main/resources/quartz.properties

@@ -0,0 +1,6 @@
+org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
+org.quartz.threadPool.threadCount=20
+org.quartz.threadPool.threadPriority=5
+org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true
+org.quartz.jobStore.misfireThreshold=60000
+org.quartz.jobStore.class=org.quartz.simpl.RAMJobStore

+ 3 - 3
mondule-jbpm/src/test/java/cn/com/ctop/jbpm/JbpmApplicationTests.java

@@ -1,10 +1,10 @@
-package cn.com.ctop.jbpm;
+package cn.com.ctop.logserver;
 
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
 
 
 @SpringBootTest
 @SpringBootTest
-class JbpmApplicationTests {
+class LogServerApplicationTests {
 
 
     @Test
     @Test
     void contextLoads() {
     void contextLoads() {

+ 10 - 0
module-common/src/main/java/cn/com/ctop/common/module/entity/MaterialInfo.java

@@ -119,4 +119,14 @@ public class MaterialInfo {
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
     @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
     private Date updateTime;
     private Date updateTime;
 
 
+    private Integer toutiaoEffiType; //判断是否为头条有效素材0否_1是
+
+    private Integer kuaishouEffiType; //判断是否为快手有效素材0否_1是
+
+    @TableField(exist = false)
+    private Integer kuaishouVideoIsUp;  //判断是否已经同步到快手平台0否_1是
+
+    @TableField(exist = false)
+    private Integer toutiaoVideoIsUp;  //判断是否已经同步到头条平台0否_1是
+
 }
 }

+ 4 - 0
module-common/src/main/java/cn/com/ctop/common/module/mapper/MaterialInfoMapper.java

@@ -20,4 +20,8 @@ public interface MaterialInfoMapper extends BaseMapper<MaterialInfo> {
     Integer selectCountByMap(Map<String, Object> requestMap);
     Integer selectCountByMap(Map<String, Object> requestMap);
 
 
     String getRoleCodeByUserId(@Param("userId") String userId);
     String getRoleCodeByUserId(@Param("userId") String userId);
+
+    Integer getKuaishouUpVideoCount(@Param("code")String code);
+
+    Integer getToutiaoUpVideoCount(@Param("code")String code);
 }
 }

+ 17 - 0
module-common/src/main/java/cn/com/ctop/common/module/mapper/xml/MaterialInfoMapper.xml

@@ -40,5 +40,22 @@
     )
     )
     </select>
     </select>
 
 
+    <select id="getKuaishouUpVideoCount" resultType="java.lang.Integer">
+        select
+        count(1)
+        from
+        ctop_kuaishou_video_get v
+        where
+        v.signature = #{code}
+    </select>
+
+    <select id="getToutiaoUpVideoCount" resultType="java.lang.Integer">
+        select
+        count(1)
+        from
+        ctop_bytedance_video_info v
+        where
+        v.signature = #{code}
+    </select>
 
 
 </mapper>
 </mapper>

+ 5 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/IMaterialInfoService.java

@@ -3,6 +3,7 @@ package cn.com.ctop.common.module.service;
 import cn.com.ctop.common.module.entity.MaterialInfo;
 import cn.com.ctop.common.module.entity.MaterialInfo;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.apache.ibatis.annotations.Param;
 
 
 import java.util.Map;
 import java.util.Map;
 
 
@@ -33,4 +34,8 @@ public interface IMaterialInfoService extends IService<MaterialInfo> {
     void getFile(MaterialInfo materialInfo);
     void getFile(MaterialInfo materialInfo);
 
 
     void setExcellent(String id, Integer excellent);
     void setExcellent(String id, Integer excellent);
+
+    Integer getKuaishouUpVideoCount(@Param("code")String code);
+
+    Integer getToutiaoUpVideoCount(@Param("code")String code);
 }
 }

+ 11 - 1
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java

@@ -65,7 +65,7 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
         String path = materialInfo.getUrl().substring(materialInfo.getUrl().indexOf("/", 10) + 1, materialInfo.getUrl().length());
         String path = materialInfo.getUrl().substring(materialInfo.getUrl().indexOf("/", 10) + 1, materialInfo.getUrl().length());
         System.out.println(path);
         System.out.println(path);
         String jobId = mpsUtils.videoWaterMark(path, videoWatermarkTemplate.getTemplatePath(), videoWatermarkTemplate.getTemplateId(), videoWatermarkTemplate.getHeight());
         String jobId = mpsUtils.videoWaterMark(path, videoWatermarkTemplate.getTemplatePath(), videoWatermarkTemplate.getTemplateId(), videoWatermarkTemplate.getHeight());
-        QueryJobListResponse.Job job = mpsUtils.getJobStatus(jobId);
+        QueryJobListResponse.Job job = MpsUtils.getJobStatus(jobId);
         VideoWatermarkTask videoWatermarkTask = new VideoWatermarkTask();
         VideoWatermarkTask videoWatermarkTask = new VideoWatermarkTask();
         videoWatermarkTask.setJobId(jobId);
         videoWatermarkTask.setJobId(jobId);
         videoWatermarkTask.setUserId(userId);
         videoWatermarkTask.setUserId(userId);
@@ -412,4 +412,14 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
         info.setExcellent(excellent);
         info.setExcellent(excellent);
         this.updateById(info);
         this.updateById(info);
     }
     }
+
+    @Override
+    public Integer getKuaishouUpVideoCount(String code) {
+        return materialInfoMapper.getKuaishouUpVideoCount(code);
+    }
+
+    @Override
+    public Integer getToutiaoUpVideoCount(String code) {
+        return materialInfoMapper.getToutiaoUpVideoCount(code);
+    }
 }
 }

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/utils/CtopAdConstant.java

@@ -16,4 +16,6 @@ public class CtopAdConstant {
     public static final String UREPORT_PREVIEW_URL_PREFIX = "/jeecg-boot/ureport/designer?_u=mysql:";
     public static final String UREPORT_PREVIEW_URL_PREFIX = "/jeecg-boot/ureport/designer?_u=mysql:";
 
 
 
 
+    public static final String CTOP_ORGCODE_NORTH_CHINA_PREFIX = "A01";
+    public static final String CTOP_ORGCODE_EAST_CHINA_PREFIX = "A02";
 }
 }

+ 1 - 1
module-common/src/main/java/cn/com/ctop/common/module/utils/HttpUtils.java

@@ -80,7 +80,7 @@ public class HttpUtils {
                 return JSONObject.parseObject(result.toString());
                 return JSONObject.parseObject(result.toString());
             }
             }
         } catch (Exception e) {
         } catch (Exception e) {
-            log.error(e.getMessage());
+            e.printStackTrace();
         } finally {
         } finally {
             try {
             try {
                 if (response != null) {
                 if (response != null) {

+ 3 - 0
module-common/src/main/java/cn/com/ctop/common/module/utils/StatusCode.java

@@ -32,6 +32,7 @@ public enum StatusCode {
     ACCOUNT_HAS_NO_AUTHORIZE("该用户尚未进行授权", -209, false),
     ACCOUNT_HAS_NO_AUTHORIZE("该用户尚未进行授权", -209, false),
     FILE_HAS_UPLOAD("文件已经上传过", 0, false),
     FILE_HAS_UPLOAD("文件已经上传过", 0, false),
     COMMON_SERVER_ERROR("服务器内部错误", -102, false),
     COMMON_SERVER_ERROR("服务器内部错误", -102, false),
+    CTOP_HAS_NO_PERFORMANCE_STATISTIC_LOGIC("绩效统计逻辑尚未确定", -103, false),
     KUAISHOU_CRAWLER_APP_EXIT("快手app异常退出", -1001, false),
     KUAISHOU_CRAWLER_APP_EXIT("快手app异常退出", -1001, false),
     KUAISHOU_CRAWLER_APP_ELEMENT_ERROR("快手元素异常", -1002, false),
     KUAISHOU_CRAWLER_APP_ELEMENT_ERROR("快手元素异常", -1002, false),
     KUAISHOU_CRAWLER_APP_ELEMENT_IS_NULL("此快手元素获取不到", -1003, false),
     KUAISHOU_CRAWLER_APP_ELEMENT_IS_NULL("此快手元素获取不到", -1003, false),
@@ -40,6 +41,8 @@ public enum StatusCode {
     KUAISHOU_CRAWLER_APP_NO_ENABLED_DEVICE("暂无可用设备", -2001, false),
     KUAISHOU_CRAWLER_APP_NO_ENABLED_DEVICE("暂无可用设备", -2001, false),
     KUAISHOU_OPTINIZER_CONFIG_IS_NULL("快手媒体优化师配置信息不全", -3001, false),
     KUAISHOU_OPTINIZER_CONFIG_IS_NULL("快手媒体优化师配置信息不全", -3001, false),
     KUAISHOU_OPTINIZER_PERSONNAL_DATA_IS_NULL("快手媒体优化师个人消耗数据不存在", -3002, false),
     KUAISHOU_OPTINIZER_PERSONNAL_DATA_IS_NULL("快手媒体优化师个人消耗数据不存在", -3002, false),
+    BYTEDANCE_OPTINIZER_PERSONNAL_DATA_IS_NULL("头条媒体优化师个人消耗数据不存在", -3003, false),
+    OPTINIZER_PERSONNAL_DATA_IS_NULL("优化师个人消耗数据不存在", -3004, false),
     KUAISHOU_CRAWLER_APP_SUCCESS("爬虫运行正常", 0, true),
     KUAISHOU_CRAWLER_APP_SUCCESS("爬虫运行正常", 0, true),
     KUAISHOU_CRAWLER_APP_TASK_END("爬虫任务运行结束", 1, true),
     KUAISHOU_CRAWLER_APP_TASK_END("爬虫任务运行结束", 1, true),
     KUAISHOU_CRAWLER_APP_JOB_StART("任务开始执行开始", 0, true),
     KUAISHOU_CRAWLER_APP_JOB_StART("任务开始执行开始", 0, true),

+ 37 - 0
module-report/src/main/java/cn/com/ctop/bytedance/controller/BytedanceCreativeDailyReportController.java

@@ -3,6 +3,7 @@ package cn.com.ctop.bytedance.controller;
 import cn.com.ctop.bytedance.entity.BytedanceCreativeDailyReport;
 import cn.com.ctop.bytedance.entity.BytedanceCreativeDailyReport;
 import cn.com.ctop.bytedance.service.IBytedanceCreativeDailyReportService;
 import cn.com.ctop.bytedance.service.IBytedanceCreativeDailyReportService;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -245,4 +246,40 @@ public class BytedanceCreativeDailyReportController {
         return Result.ok("文件导入失败!");
         return Result.ok("文件导入失败!");
     }
     }
 
 
+    /**
+     * bytedanceCreativeDailyReportList
+     *
+     * @param json
+     * @return
+     */
+    @AutoLog(value = "头条素材报表")
+    @ApiOperation(value = "头条素材报表", notes = "头条素材报表")
+    @PostMapping(value = "/bytedanceCreativeDailyReportList")
+    public Result<List<BytedanceCreativeDailyReport>> bytedanceCreativeDailyReportList(@RequestBody JSONObject json,
+                                                                                       HttpServletRequest request, HttpServletResponse response) {
+        Result<List<BytedanceCreativeDailyReport>> result = new Result<>();
+        List<BytedanceCreativeDailyReport> bytedanceCreativeDailyReportList = bytedanceCreativeDailyReportService.bytedanceCreativeDailyReportList(json);
+        result.setResult(bytedanceCreativeDailyReportList);
+        result.setSuccess(true);
+        return result;
+    }
+
+    /**
+     * bytedanceCreativeAccountReportList
+     *
+     * @param json
+     * @return
+     */
+    @AutoLog(value = "头条素材账户报表")
+    @ApiOperation(value = "头条素材账户报表", notes = "头条素材账户报表")
+    @PostMapping(value = "/bytedanceCreativeAccountReportList")
+    public Result<List<BytedanceCreativeDailyReport>> bytedanceCreativeAccountReportList(@RequestBody JSONObject json,
+                                                                                         HttpServletRequest request, HttpServletResponse response) {
+        Result<List<BytedanceCreativeDailyReport>> result = new Result<>();
+        List<BytedanceCreativeDailyReport> bytedanceCreativeDailyReportList = bytedanceCreativeDailyReportService.bytedanceCreativeAccountReportList(json);
+        result.setResult(bytedanceCreativeDailyReportList);
+        result.setSuccess(true);
+        return result;
+    }
+
 }
 }

+ 10 - 0
module-report/src/main/java/cn/com/ctop/bytedance/entity/BytedanceCreativeDailyReport.java

@@ -400,6 +400,16 @@ public class BytedanceCreativeDailyReport {
     @ApiModelProperty(value = "updateTime")
     @ApiModelProperty(value = "updateTime")
     private Date updateTime;
     private Date updateTime;
 
 
+    private String videoUrl;
+
+    public String getVideoUrl() {
+        return videoUrl;
+    }
+
+    public void setVideoUrl(String videoUrl) {
+        this.videoUrl = videoUrl;
+    }
+
     public BytedanceCreativeDailyReport(JSONObject data, Long setAdvertiserId) {
     public BytedanceCreativeDailyReport(JSONObject data, Long setAdvertiserId) {
         Long playFeedBreak75 = data.getLong("play_75_feed_break");
         Long playFeedBreak75 = data.getLong("play_75_feed_break");
         if (null != playFeedBreak75) {
         if (null != playFeedBreak75) {

+ 5 - 0
module-report/src/main/java/cn/com/ctop/bytedance/entity/BytedancePlanDailyReport.java

@@ -415,6 +415,11 @@ public class BytedancePlanDailyReport {
      */
      */
     private String channelCode;
     private String channelCode;
 
 
+    /**
+     * 素材名称
+     */
+    private String materialName;
+
     public BytedancePlanDailyReport(JSONObject data, Long setAdvertiserId) {
     public BytedancePlanDailyReport(JSONObject data, Long setAdvertiserId) {
         Long playFeedBreak75 = data.getLong("play_75_feed_break");
         Long playFeedBreak75 = data.getLong("play_75_feed_break");
         if (null != playFeedBreak75) {
         if (null != playFeedBreak75) {

+ 7 - 0
module-report/src/main/java/cn/com/ctop/bytedance/mapper/BytedanceCreativeDailyReportMapper.java

@@ -3,6 +3,9 @@ package cn.com.ctop.bytedance.mapper;
 import cn.com.ctop.bytedance.entity.BytedanceCreativeDailyReport;
 import cn.com.ctop.bytedance.entity.BytedanceCreativeDailyReport;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 
+import java.util.List;
+import java.util.Map;
+
 /**
 /**
  * @Description: 广告创意日报表信息
  * @Description: 广告创意日报表信息
  * @Author: jeecg-boot
  * @Author: jeecg-boot
@@ -10,5 +13,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  * @Version: V1.0
  * @Version: V1.0
  */
  */
 public interface BytedanceCreativeDailyReportMapper extends BaseMapper<BytedanceCreativeDailyReport> {
 public interface BytedanceCreativeDailyReportMapper extends BaseMapper<BytedanceCreativeDailyReport> {
+    List<BytedanceCreativeDailyReport> bytedanceCreativeDailyReport(Map<String, Object> paramsMap);
+
+    List<BytedanceCreativeDailyReport> bytedanceCreativeAccountReport(Map<String, Object> paramsMap);
+
 
 
 }
 }

+ 92 - 0
module-report/src/main/java/cn/com/ctop/bytedance/mapper/xml/BytedanceCreativeDailyReportMapper.xml

@@ -1,5 +1,97 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?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">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.ctop.bytedance.mapper.BytedanceCreativeDailyReportMapper">
 <mapper namespace="cn.com.ctop.bytedance.mapper.BytedanceCreativeDailyReportMapper">
+    <select id="bytedanceCreativeDailyReport" parameterType="Map"
+            resultType="cn.com.ctop.bytedance.entity.BytedanceCreativeDailyReport">
+        select
+        t2.creative_id as creativeId,  <!-- 素材id -->
+        t4.video_url as videoUrl,  <!-- 视频url -->
+        sum(t2.show_num) as showNum,  <!-- 展示量 -->
+        sum(t2.click) as click,  <!-- 点击量 -->
+        sum(t2.convert_num) as convertNum,  <!-- 转化量 -->
+        sum(t2.cost) as cost,  <!-- 总花费 -->
+        sum(t2.active) as active, <!-- 应用下载-激活 -->
+        sum(t2.download_finish) as downloadFinish,  <!-- 应用下载-安卓下载完成 -->
+        sum(t2.click_install) as clickInstall,  <!-- 应用下载-点击安装数 -->
+        sum(t2.in_app_pay) as inAppPay, <!-- 应用下载-付费 -->
+        sum(t2.total_play) as totalPlay, <!-- 视频-总播放 -->
+        sum(t2.valid_play) as validPlay, <!-- 视频-有效播放 -->
+        sum(t2.wifi_play) as wifiPlay, <!-- 视频-wifi播放 -->
+        sum(t2.play100_feed_break) as play100FeedBreak,  <!-- 视频-播放100%进度总数 -->
+        sum(t2.play75_feed_break) as play75FeedBreak,  <!-- 视频-播放75%进度总数 -->
+        sum(t2.comment) as comment,  <!-- 互动数据-评论数 -->
+        AVG(t2.next_day_open) as nextDayOpen,  <!-- 次留数 -->
+        AVG(t2.next_day_open_rate) as nextDayOpenRate,  <!-- 次留率 -->
+        AVG(t2.next_day_open_cost) as nextDayOpenCost  <!-- 次留成本 -->
+        from
+        ctop_user_allocation t1
+        left join ctop_bytedance_report_creative_daily t2 on t1.account_id = t2.advertiser_id
+        left join ctop_bytedance_creative t3 on t2.creative_id = t3.id
+        left join ctop_bytedance_video_info t4 on t3.video_id = t4.id
+        where
+        t3.id is not NULL
+        and t1.media_id = '1'
+        and t1.account_id != ''
+        <if test="userId != null">
+            and t1.user_id = #{userId,jdbcType=VARCHAR}
+        </if>
+
+        <if test="startDate != null">
+            and t2.stat_datetime &gt;= #{startDate}
+        </if>
+        <if test="endDate != null">
+            and t2.stat_datetime &lt;= #{endDate}
+        </if>
+        group by t4.signature
+        order by sum(t2.cost) desc
+        limit 100
+    </select>
+
+    <select id="bytedanceCreativeAccountReport" parameterType="Map"
+            resultType="cn.com.ctop.bytedance.entity.BytedanceCreativeDailyReport">
+        select
+        t2.creative_id as creativeId,  <!-- 素材id -->
+        t4.video_url as videoUrl,  <!-- 视频url -->
+        sum(t2.show_num) as showNum,  <!-- 展示量 -->
+        sum(t2.click) as click,  <!-- 点击量 -->
+        sum(t2.convert_num) as convertNum,  <!-- 转化量 -->
+        sum(t2.cost) as cost,  <!-- 总花费 -->
+        sum(t2.active) as active, <!-- 应用下载-激活 -->
+        sum(t2.download_finish) as downloadFinish,  <!-- 应用下载-安卓下载完成 -->
+        sum(t2.click_install) as clickInstall,  <!-- 应用下载-点击安装数 -->
+        sum(t2.in_app_pay) as inAppPay, <!-- 应用下载-付费 -->
+        sum(t2.total_play) as totalPlay, <!-- 视频-总播放 -->
+        sum(t2.valid_play) as validPlay, <!-- 视频-有效播放 -->
+        sum(t2.wifi_play) as wifiPlay, <!-- 视频-wifi播放 -->
+        sum(t2.play100_feed_break) as play100FeedBreak,  <!-- 视频-播放100%进度总数 -->
+        sum(t2.play75_feed_break) as play75FeedBreak,  <!-- 视频-播放75%进度总数 -->
+        sum(t2.comment) as comment,  <!-- 互动数据-评论数 -->
+        AVG(t2.next_day_open) as nextDayOpen,  <!-- 次留数 -->
+        AVG(t2.next_day_open_rate) as nextDayOpenRate,  <!-- 次留率 -->
+        AVG(t2.next_day_open_cost) as nextDayOpenCost  <!-- 次留成本 -->
+        from
+        ctop_user_allocation t1
+        left join ctop_bytedance_report_creative_daily t2 on t1.account_id = t2.advertiser_id
+        left join ctop_bytedance_creative t3 on t2.creative_id = t3.id
+        left join ctop_bytedance_video_info t4 on t3.video_id = t4.id
+        where t1.account_id in
+        <foreach item="item" index="index" collection="accountIds"
+                 open="(" separator="," close=")">
+            #{item}
+        </foreach>
+        and t1.media_id = '1'
+        and t1.account_id != ''
+        <if test="startDate != null">
+            and t2.stat_datetime &gt;= #{startDate}
+        </if>
+        <if test="endDate != null">
+            and t2.stat_datetime &lt;= #{endDate}
+        </if>
+        and t3.id is not NULL
+        group by t4.signature
+        order by sum(t2.cost) desc
+        limit 100
+    </select>
+
 
 
 </mapper>
 </mapper>

+ 9 - 0
module-report/src/main/java/cn/com/ctop/bytedance/service/IBytedanceCreativeDailyReportService.java

@@ -1,8 +1,11 @@
 package cn.com.ctop.bytedance.service;
 package cn.com.ctop.bytedance.service;
 
 
 import cn.com.ctop.bytedance.entity.BytedanceCreativeDailyReport;
 import cn.com.ctop.bytedance.entity.BytedanceCreativeDailyReport;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 
+import java.util.List;
+
 /**
 /**
  * @Description: 广告创意日报表信息
  * @Description: 广告创意日报表信息
  * @Author: jeecg-boot
  * @Author: jeecg-boot
@@ -11,4 +14,10 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
  */
 public interface IBytedanceCreativeDailyReportService extends IService<BytedanceCreativeDailyReport> {
 public interface IBytedanceCreativeDailyReportService extends IService<BytedanceCreativeDailyReport> {
 
 
+    List<BytedanceCreativeDailyReport> bytedanceCreativeDailyReportList(JSONObject json);
+
+    List<BytedanceCreativeDailyReport> bytedanceCreativeAccountReportList(JSONObject json);
+
+
+
 }
 }

+ 44 - 0
module-report/src/main/java/cn/com/ctop/bytedance/service/impl/BytedanceCreativeDailyReportServiceImpl.java

@@ -2,11 +2,21 @@ package cn.com.ctop.bytedance.service.impl;
 
 
 import cn.com.ctop.bytedance.entity.BytedanceCreativeDailyReport;
 import cn.com.ctop.bytedance.entity.BytedanceCreativeDailyReport;
 import cn.com.ctop.bytedance.mapper.BytedanceCreativeDailyReportMapper;
 import cn.com.ctop.bytedance.mapper.BytedanceCreativeDailyReportMapper;
+import cn.com.ctop.bytedance.mapper.MaterialReportMapper;
 import cn.com.ctop.bytedance.service.IBytedanceCreativeDailyReportService;
 import cn.com.ctop.bytedance.service.IBytedanceCreativeDailyReportService;
+import cn.com.ctop.common.module.utils.Check;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.common.util.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
 /**
  * @Description: 广告创意日报表信息
  * @Description: 广告创意日报表信息
  * @Author: jeecg-boot
  * @Author: jeecg-boot
@@ -15,5 +25,39 @@ import org.springframework.stereotype.Service;
  */
  */
 @Service
 @Service
 public class BytedanceCreativeDailyReportServiceImpl extends ServiceImpl<BytedanceCreativeDailyReportMapper, BytedanceCreativeDailyReport> implements IBytedanceCreativeDailyReportService {
 public class BytedanceCreativeDailyReportServiceImpl extends ServiceImpl<BytedanceCreativeDailyReportMapper, BytedanceCreativeDailyReport> implements IBytedanceCreativeDailyReportService {
+    @Autowired
+    private BytedanceCreativeDailyReportMapper bytedanceCreativeDailyReportMapper;
+
+    @Override
+    public List<BytedanceCreativeDailyReport> bytedanceCreativeDailyReportList(JSONObject json) {
+        String userId = json.getString("userId");
+        if (Check.isNull(userId)) {
+            return null;
+        }
+        String nowDate = json.getString("startDate");
+        String endDate = json.getString("endDate");
+        Map<String, Object> paramsMap = new HashMap<>();
+        paramsMap.put("userId", userId);
+        paramsMap.put("startDate", nowDate);
+        paramsMap.put("endDate", endDate);
+
+        return bytedanceCreativeDailyReportMapper.bytedanceCreativeDailyReport(paramsMap);
+    }
+
+    @Override
+    public List<BytedanceCreativeDailyReport> bytedanceCreativeAccountReportList(JSONObject json) {
+        Map<String, Object> paramsMap = new HashMap<>();
+        JSONArray accountIds = json.getJSONArray("accountIds");
+        if (Check.isNull(accountIds)) {
+            return null;
+        }
+        paramsMap.put("accountIds", accountIds);
+        String nowDate = json.getString("startDate");
+        String endDate = json.getString("endDate");
+        paramsMap.put("startDate", nowDate);
+        paramsMap.put("endDate", endDate);
+
+        return bytedanceCreativeDailyReportMapper.bytedanceCreativeAccountReport(paramsMap);
+    }
 
 
 }
 }

+ 32 - 17
module-report/src/main/java/cn/com/ctop/bytedance/service/impl/ReportServiceImpl.java

@@ -95,7 +95,7 @@ public class ReportServiceImpl implements IReportService {
         }
         }
         JSONArray dataArray = getObject.getJSONObject("data").getJSONArray("list");
         JSONArray dataArray = getObject.getJSONObject("data").getJSONArray("list");
         if (null == dataArray || dataArray.size() <= 0) {
         if (null == dataArray || dataArray.size() <= 0) {
-            log.info("广告主报表信息为空=》accountId:{}", token.getAccountId());
+//            log.info("广告主报表信息为空=》accountId:{}", token.getAccountId());
             return;
             return;
         }
         }
 
 
@@ -379,16 +379,6 @@ public class ReportServiceImpl implements IReportService {
         return getObject;
         return getObject;
     }
     }
 
 
-    private JSONObject getAdStat(CtopOauthToken token, JSONObject conditions) {
-        // 请求地址
-        String url = "https://ad.toutiao.com/open_api/2/report/ad/get/";
-        JSONArray groupBy = new JSONArray();
-        groupBy.add("STAT_GROUP_BY_FIELD_ID");
-        groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
-        conditions.put("group_by", groupBy);
-        return HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, conditions);
-    }
-
     @Override
     @Override
     public void insertCustomerInfo(String csvPath, String charset) {
     public void insertCustomerInfo(String csvPath, String charset) {
         try {
         try {
@@ -820,15 +810,33 @@ public class ReportServiceImpl implements IReportService {
         }
         }
     }
     }
 
 
-    public JSONObject getAgentStat(CtopOauthToken token, JSONObject conditions) {
+    /**
+     * 获取广告创意报表信息
+     *
+     * @param token
+     * @param conditions
+     * @return
+     */
+    public JSONObject getCreativeStat(CtopOauthToken token, JSONObject conditions) {
         // 请求地址
         // 请求地址
-        String url = "https://ad.toutiao.com/open_api/2/report/agent/get/";
+        String url = PropertiesUtils.getConfig("bytedance_api_url") + PropertiesUtils.getConfig("bytedance_v2_ad_creative_get");
+        JSONArray groupBy = new JSONArray();
+        groupBy.add("STAT_GROUP_BY_FIELD_ID");
+        groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
+        conditions.put("group_by", groupBy);
         return HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, conditions);
         return HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, conditions);
     }
     }
 
 
-    public JSONObject getCreativeStat(CtopOauthToken token, JSONObject conditions) {
+    /**
+     * 获取广告计划报表信息
+     *
+     * @param token
+     * @param conditions
+     * @return
+     */
+    private JSONObject getAdStat(CtopOauthToken token, JSONObject conditions) {
         // 请求地址
         // 请求地址
-        String url = "https://ad.toutiao.com/open_api/2/report/creative/get/";
+        String url = PropertiesUtils.getConfig("bytedance_api_url") + PropertiesUtils.getConfig("bytedance_v2_ad_report_get");
         JSONArray groupBy = new JSONArray();
         JSONArray groupBy = new JSONArray();
         groupBy.add("STAT_GROUP_BY_FIELD_ID");
         groupBy.add("STAT_GROUP_BY_FIELD_ID");
         groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
         groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
@@ -836,9 +844,16 @@ public class ReportServiceImpl implements IReportService {
         return HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, conditions);
         return HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, conditions);
     }
     }
 
 
+    /**
+     * 获取广告组报表信息
+     *
+     * @param token
+     * @param conditions
+     * @return
+     */
     public JSONObject getCampaignStat(CtopOauthToken token, JSONObject conditions) {
     public JSONObject getCampaignStat(CtopOauthToken token, JSONObject conditions) {
         // 请求地址
         // 请求地址
-        String url = "https://ad.toutiao.com/open_api/2/report/campaign/get/";
+        String url = PropertiesUtils.getConfig("bytedance_api_url") + PropertiesUtils.getConfig("bytedance_v2_campaign_report_get");
         JSONArray groupBy = new JSONArray();
         JSONArray groupBy = new JSONArray();
         groupBy.add("STAT_GROUP_BY_FIELD_ID");
         groupBy.add("STAT_GROUP_BY_FIELD_ID");
         groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
         groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
@@ -855,7 +870,7 @@ public class ReportServiceImpl implements IReportService {
      */
      */
     public JSONObject getAdvertiserStat(CtopOauthToken token, JSONObject conditions) {
     public JSONObject getAdvertiserStat(CtopOauthToken token, JSONObject conditions) {
         // 请求地址
         // 请求地址
-        String url = "https://ad.toutiao.com/open_api/2/report/advertiser/get/";
+        String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_advertiser_report_get");
         JSONArray groupBy = new JSONArray();
         JSONArray groupBy = new JSONArray();
         groupBy.add("STAT_GROUP_BY_FIELD_ID");
         groupBy.add("STAT_GROUP_BY_FIELD_ID");
         groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
         groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");

+ 5 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/entity/ByteDanceVideoInfo.java

@@ -80,6 +80,10 @@ public class ByteDanceVideoInfo {
     @Excel(name = "视频地址", width = 15)
     @Excel(name = "视频地址", width = 15)
     @ApiModelProperty(value = "视频地址")
     @ApiModelProperty(value = "视频地址")
     private String videoUrl;
     private String videoUrl;
+
+    @Excel(name = "md5码", width = 64)
+    @ApiModelProperty(value = "md5码")
+    private String signature;
     /**
     /**
      * status
      * status
      */
      */
@@ -107,6 +111,7 @@ public class ByteDanceVideoInfo {
         this.size = data.getLong("size");
         this.size = data.getLong("size");
         this.duration = data.getDouble("duration");
         this.duration = data.getDouble("duration");
         this.videoUrl = data.getString("video_url");
         this.videoUrl = data.getString("video_url");
+        this.signature = data.getString("signature");
         this.status = 1;
         this.status = 1;
         Date now = new Date();
         Date now = new Date();
         this.createTime = now;
         this.createTime = now;

+ 7 - 1
module-toutiao/src/main/resources/bytedance_config.properties

@@ -6,6 +6,7 @@ bytedance_secret=0c51523e90d6166418fc8421a4896808e90e26f4
 #release
 #release
 bytedance_api_url=https://ad.oceanengine.com/open_api
 bytedance_api_url=https://ad.oceanengine.com/open_api
 bytedance_auth_url=https://ad.oceanengine.com/openapi
 bytedance_auth_url=https://ad.oceanengine.com/openapi
+
 #sandbox
 #sandbox
 #bytedance_api_url=https://test-ad.toutiao.com/open_api
 #bytedance_api_url=https://test-ad.toutiao.com/open_api
 #bytedance_auth_url=https://test-ad.toutiao.com/open_api
 #bytedance_auth_url=https://test-ad.toutiao.com/open_api
@@ -25,6 +26,11 @@ bytedance_v2_dmp_custom_audience_select=/2/dmp/custom_audience/select/
 bytedance_v2_file_video_ad=/2/file/video/ad/
 bytedance_v2_file_video_ad=/2/file/video/ad/
 bytedance_v2_file_image_ad=/2/file/image/ad/
 bytedance_v2_file_image_ad=/2/file/image/ad/
 bytedance_v2_creative_update_status=/2/creative/update/status/
 bytedance_v2_creative_update_status=/2/creative/update/status/
-bytedance_v2_creative_material_get=/2/creative/material/read
+bytedance_v2_creative_material_get=/2/creative/material/read/
 bytedance_v2_creative_create_v2=/2/creative/create_v2/
 bytedance_v2_creative_create_v2=/2/creative/create_v2/
 bytedance_v2_creative_get=/2/creative/get/
 bytedance_v2_creative_get=/2/creative/get/
+##报表相关
+bytedance_v2_advertiser_report_get=/2/report/advertiser/get/
+bytedance_v2_campaign_report_get=/2/report/campaign/get/
+bytedance_v2_ad_report_get=/2/report/ad/get/
+bytedance_v2_ad_creative_get=/2/report/creative/get/

+ 0 - 49
mondule-jbpm/pom.xml

@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <artifactId>jeecg-boot-parent</artifactId>
-        <groupId>org.jeecgframework.boot</groupId>
-        <version>2.0.2</version>
-    </parent>
-    <groupId>cn.com.ctop</groupId>
-    <artifactId>mondule-jbpm</artifactId>
-    <version>0.0.1-SNAPSHOT</version>
-    <name>mondule-jbpm</name>
-
-    <properties>
-        <java.version>1.8</java.version>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>cn.com.ctop</groupId>
-            <artifactId>module-common</artifactId>
-            <version>2.0.2</version>
-        </dependency>
-        <dependency>
-            <groupId>org.activiti</groupId>
-            <artifactId>activiti-spring</artifactId>
-            <version>6.0.0</version>
-        </dependency>
-    </dependencies>
-    <build>
-        <resources>
-            <!-- 解决MyBatis配置文件引入问题 -->
-            <resource>
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.properties</include>
-                    <include>**/*.xml</include>
-                </includes>
-                <!-- 是否替换资源中的属性-->
-                <filtering>false</filtering>
-            </resource>
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-        </resources>
-    </build>
-
-</project>

+ 0 - 13
mondule-jbpm/src/main/java/cn/com/ctop/jbpm/JbpmApplication.java

@@ -1,13 +0,0 @@
-package cn.com.ctop.jbpm;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class JbpmApplication {
-
-    public static void main(String[] args) {
-        SpringApplication.run(JbpmApplication.class, args);
-    }
-
-}

+ 0 - 29
mondule-jbpm/src/main/java/cn/com/ctop/jbpm/service/ActivitiTable.java

@@ -1,29 +0,0 @@
-package cn.com.ctop.jbpm.service;
-
-import org.activiti.engine.ProcessEngine;
-import org.activiti.engine.ProcessEngineConfiguration;
-
-/**
- * @author jeecg-boot
- * 2019年12月5日19:55:14
- */
-public class ActivitiTable {
-    public static void main(String[] args) {
-        // 引擎配置
-        ProcessEngineConfiguration pec = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
-        pec.setJdbcDriver("com.mysql.jdbc.Driver");
-        pec.setJdbcUrl("jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false");
-        pec.setJdbcUsername("hcst");
-        pec.setJdbcPassword("hcst2019");
-        /**
-         * false 不能自动创建表
-         * create-drop 先删除表再创建表
-         * true 自动创建和更新表
-         */
-        pec.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
-
-        // 获取流程引擎对象
-        ProcessEngine processEngine = pec.buildProcessEngine();
-
-    }
-}

+ 0 - 1
mondule-jbpm/src/main/resources/application.properties

@@ -1 +0,0 @@
-

文件差异内容过多而无法显示
+ 0 - 76
mondule-jbpm/src/main/resources/processes/testbpm.bpmn


+ 118 - 0
moudule-eureca/.mvn/wrapper/MavenWrapperDownloader.java

@@ -0,0 +1,118 @@
+/*
+ * Copyright 2007-present the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.net.*;
+import java.io.*;
+import java.nio.channels.*;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+    private static final String WRAPPER_VERSION = "0.5.6";
+    /**
+     * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+     */
+    private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+            + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
+
+    /**
+     * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+     * use instead of the default one.
+     */
+    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+            ".mvn/wrapper/maven-wrapper.properties";
+
+    /**
+     * Path where the maven-wrapper.jar will be saved to.
+     */
+    private static final String MAVEN_WRAPPER_JAR_PATH =
+            ".mvn/wrapper/maven-wrapper.jar";
+
+    /**
+     * Name of the property which should be used to override the default download url for the wrapper.
+     */
+    private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+    public static void main(String args[]) {
+        System.out.println("- Downloader started");
+        File baseDirectory = new File(args[0]);
+        System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+        // If the maven-wrapper.properties exists, read it and check if it contains a custom
+        // wrapperUrl parameter.
+        File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+        String url = DEFAULT_DOWNLOAD_URL;
+        if (mavenWrapperPropertyFile.exists()) {
+            FileInputStream mavenWrapperPropertyFileInputStream = null;
+            try {
+                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+                Properties mavenWrapperProperties = new Properties();
+                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+            } catch (IOException e) {
+                System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+            } finally {
+                try {
+                    if (mavenWrapperPropertyFileInputStream != null) {
+                        mavenWrapperPropertyFileInputStream.close();
+                    }
+                } catch (IOException e) {
+                    // Ignore ...
+                }
+            }
+        }
+        System.out.println("- Downloading from: " + url);
+
+        File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+        if (!outputFile.getParentFile().exists()) {
+            if (!outputFile.getParentFile().mkdirs()) {
+                System.out.println(
+                        "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+            }
+        }
+        System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+        try {
+            downloadFileFromURL(url, outputFile);
+            System.out.println("Done");
+            System.exit(0);
+        } catch (Throwable e) {
+            System.out.println("- Error downloading");
+            e.printStackTrace();
+            System.exit(1);
+        }
+    }
+
+    private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+        if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
+            String username = System.getenv("MVNW_USERNAME");
+            char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
+            Authenticator.setDefault(new Authenticator() {
+                @Override
+                protected PasswordAuthentication getPasswordAuthentication() {
+                    return new PasswordAuthentication(username, password);
+                }
+            });
+        }
+        URL website = new URL(urlString);
+        ReadableByteChannel rbc;
+        rbc = Channels.newChannel(website.openStream());
+        FileOutputStream fos = new FileOutputStream(destination);
+        fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+        fos.close();
+        rbc.close();
+    }
+
+}

二进制
moudule-eureca/.mvn/wrapper/maven-wrapper.jar


+ 2 - 0
moudule-eureca/.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

+ 62 - 0
moudule-eureca/pom.xml

@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.2.RELEASE</version>
+        <relativePath/>
+    </parent>
+    <groupId>cn.com.ctop.eureca</groupId>
+    <artifactId>server</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>server</name>
+    <description>Demo project for Spring Boot</description>
+
+    <properties>
+        <java.version>1.8</java.version>
+        <spring-cloud.version>Hoxton.SR1</spring-cloud.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.junit.vintage</groupId>
+                    <artifactId>junit-vintage-engine</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>${spring-cloud.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 15 - 0
moudule-eureca/src/main/java/cn/com/ctop/eureca/server/ServerApplication.java

@@ -0,0 +1,15 @@
+package cn.com.ctop.eureca.server;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
+
+@SpringBootApplication
+@EnableEurekaServer
+public class ServerApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(ServerApplication.class, args);
+    }
+
+}

+ 14 - 0
moudule-eureca/src/main/resources/application.yml

@@ -0,0 +1,14 @@
+server:
+  port: 8761
+
+eureka:
+  instance:
+    hostname: localhost
+  client:
+    registerWithEureka: false
+    fetchRegistry: false
+    serviceUrl:
+      defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
+spring:
+  application:
+    name: eurka-server

+ 13 - 0
moudule-eureca/src/test/java/cn/com/ctop/eureca/server/ServerApplicationTests.java

@@ -0,0 +1,13 @@
+package cn.com.ctop.eureca.server;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class ServerApplicationTests {
+
+    @Test
+    void contextLoads() {
+    }
+
+}

+ 0 - 13
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/PerformanceAppraisalApplication.java

@@ -1,13 +0,0 @@
-package cn.com.ctop.performanceappraisal;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class PerformanceAppraisalApplication {
-
-    public static void main(String[] args) {
-        SpringApplication.run(PerformanceAppraisalApplication.class, args);
-    }
-
-}

+ 248 - 0
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/controller/PerformanceConfigController.java

@@ -0,0 +1,248 @@
+package cn.com.ctop.performanceappraisal.controller;
+
+import cn.com.ctop.performanceappraisal.entity.PerformanceConfig;
+import cn.com.ctop.performanceappraisal.service.IPerformanceConfigService;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecgframework.poi.excel.ExcelImportUtil;
+import org.jeecgframework.poi.excel.def.NormalExcelConstants;
+import org.jeecgframework.poi.excel.entity.ExportParams;
+import org.jeecgframework.poi.excel.entity.ImportParams;
+import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 绩效配置文件表
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2020-01-08
+ */
+@Slf4j
+@Api(tags = "绩效配置文件表")
+@RestController
+@RequestMapping("/ctop/performanceConfig")
+public class PerformanceConfigController {
+    @Autowired
+    private IPerformanceConfigService performanceConfigService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param performanceConfig
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "绩效配置文件表-分页列表查询")
+    @ApiOperation(value = "绩效配置文件表-分页列表查询", notes = "绩效配置文件表-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<PerformanceConfig>> queryPageList(PerformanceConfig performanceConfig,
+                                                          @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                          @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                          HttpServletRequest req) {
+        Result<IPage<PerformanceConfig>> result = new Result<IPage<PerformanceConfig>>();
+        QueryWrapper<PerformanceConfig> queryWrapper = QueryGenerator.initQueryWrapper(performanceConfig, req.getParameterMap());
+        Page<PerformanceConfig> page = new Page<PerformanceConfig>(pageNo, pageSize);
+        IPage<PerformanceConfig> pageList = performanceConfigService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param performanceConfig
+     * @return
+     */
+    @AutoLog(value = "绩效配置文件表-添加")
+    @ApiOperation(value = "绩效配置文件表-添加", notes = "绩效配置文件表-添加")
+    @PostMapping(value = "/add")
+    public Result<PerformanceConfig> add(@RequestBody PerformanceConfig performanceConfig) {
+        Result<PerformanceConfig> result = new Result<PerformanceConfig>();
+        try {
+            performanceConfigService.save(performanceConfig);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param performanceConfig
+     * @return
+     */
+    @AutoLog(value = "绩效配置文件表-编辑")
+    @ApiOperation(value = "绩效配置文件表-编辑", notes = "绩效配置文件表-编辑")
+    @PutMapping(value = "/edit")
+    public Result<PerformanceConfig> edit(@RequestBody PerformanceConfig performanceConfig) {
+        Result<PerformanceConfig> result = new Result<PerformanceConfig>();
+        PerformanceConfig performanceConfigEntity = performanceConfigService.getById(performanceConfig.getId());
+        if (performanceConfigEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = performanceConfigService.updateById(performanceConfig);
+            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 {
+            performanceConfigService.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<PerformanceConfig> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<PerformanceConfig> result = new Result<PerformanceConfig>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.performanceConfigService.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<PerformanceConfig> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<PerformanceConfig> result = new Result<PerformanceConfig>();
+        PerformanceConfig performanceConfig = performanceConfigService.getById(id);
+        if (performanceConfig == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(performanceConfig);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<PerformanceConfig> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                PerformanceConfig performanceConfig = JSON.parseObject(deString, PerformanceConfig.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(performanceConfig, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<PerformanceConfig> pageList = performanceConfigService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "绩效配置文件表列表");
+        mv.addObject(NormalExcelConstants.CLASS, PerformanceConfig.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<PerformanceConfig> listPerformanceConfigs = ExcelImportUtil.importExcel(file.getInputStream(), PerformanceConfig.class, params);
+                performanceConfigService.saveBatch(listPerformanceConfigs);
+                return Result.ok("文件导入成功!数据行数:" + listPerformanceConfigs.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("文件导入失败!");
+    }
+
+}

+ 71 - 4
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/controller/PerformanceController.java

@@ -2,20 +2,24 @@ package cn.com.ctop.performanceappraisal.controller;
 
 
 import cn.com.ctop.performanceappraisal.entity.Performance;
 import cn.com.ctop.performanceappraisal.entity.Performance;
 import cn.com.ctop.performanceappraisal.service.IPerformanceService;
 import cn.com.ctop.performanceappraisal.service.IPerformanceService;
+import cn.com.ctop.userefficientvideomap.mapper.UserEfficientVideoMapMapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.aspect.annotation.AutoLog;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.vo.LoginUser;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 import java.util.Arrays;
+import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
 /**
 /**
@@ -32,6 +36,8 @@ import java.util.Map;
 public class PerformanceController {
 public class PerformanceController {
     @Autowired
     @Autowired
     private IPerformanceService performanceService;
     private IPerformanceService performanceService;
+    @Autowired
+    private UserEfficientVideoMapMapper userEfficientVideoMapMapper;
 
 
     /**
     /**
      * 分页列表查询
      * 分页列表查询
@@ -165,13 +171,74 @@ public class PerformanceController {
 
 
     @GetMapping("/project/list")
     @GetMapping("/project/list")
     public Map<String, Object> projectList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
     public Map<String, Object> projectList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                           @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
-        return performanceService.getUserOptimizerProjectList(pageNo, pageSize);
+                                           @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, String appType) {
+        return performanceService.getUserOptimizerProjectList(pageNo, pageSize, appType);
     }
     }
 
 
     @GetMapping("/account/list")
     @GetMapping("/account/list")
     public Map<String, Object> accountList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
     public Map<String, Object> accountList(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                           @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, Long projectId) {
-        return performanceService.getUserOptimizerAccountList(projectId, pageNo, pageSize);
+                                           @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                           Long projectId, String appType) {
+        return performanceService.getUserOptimizerAccountList(appType, projectId, pageNo, pageSize);
+    }
+
+
+    @AutoLog(value = "设计组内设计师季度绩效表-分页列表查询")
+    @ApiOperation(value = "设计组内设计师季度绩效表-分页列表查询", notes = "设计组内设计师季度绩效表-分页列表查询")
+    @GetMapping(value = "/designerDepartMemberPerformanceList")
+    public Result<IPage<Performance>> designerDepartMemberPerformanceList(Performance performance,
+                                                                          @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                          @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                          HttpServletRequest req) {
+        Result<IPage<Performance>> result = new Result<IPage<Performance>>();
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        //String departId = userEfficientVideoMapMapper.getDepartIdByUserId("e9ca23d68d884d4ebb19d07889727dae");
+        String departId = userEfficientVideoMapMapper.getDepartIdByUserId(sysUser.getId());
+        List<String> userIdList = userEfficientVideoMapMapper.getUserIdListByDepId(departId);
+        ////
+        QueryWrapper<Performance> queryWrapper = QueryGenerator.initQueryWrapper(performance, req.getParameterMap());
+        queryWrapper.in("user_id", userIdList);
+
+        Page<Performance> page = new Page<Performance>(pageNo, pageSize);
+        IPage<Performance> pageList = performanceService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
     }
     }
+
+    @AutoLog(value = "北京设计师季度绩效列表-分页列表查询")
+    @ApiOperation(value = "北京设计师季度绩效列表-分页列表查询", notes = "北京设计师季度绩效列表-分页列表查询")
+    @GetMapping(value = "/beijingDesignerPageList")
+    public Result<IPage<Performance>> beijingDesignerPageList(Performance performance,
+                                                              @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                              @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                              HttpServletRequest req) {
+        Result<IPage<Performance>> result = new Result<IPage<Performance>>();
+        QueryWrapper<Performance> queryWrapper = QueryGenerator.initQueryWrapper(performance, req.getParameterMap());
+        Page<Performance> page = new Page<Performance>(pageNo, pageSize);
+        IPage<Performance> pageList = performanceService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    @AutoLog(value = "北京设计师季度绩效列表-分页列表查询")
+    @ApiOperation(value = "北京设计师季度绩效列表-分页列表查询", notes = "北京设计师季度绩效列表-分页列表查询")
+    @GetMapping(value = "/beijingPlaneDesignerList")
+    public Result<IPage<Performance>> beijingPlaneDesignerPageList(Performance performance,
+                                                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                   HttpServletRequest req) {
+        Result<IPage<Performance>> result = new Result<IPage<Performance>>();
+        QueryWrapper<Performance> queryWrapper = QueryGenerator.initQueryWrapper(performance, req.getParameterMap());
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        //sysUser.setId("b0e4798234df4096936e6bc6d00db3ba");
+        queryWrapper.eq("user_id", sysUser.getId());
+        Page<Performance> page = new Page<Performance>(pageNo, pageSize);
+        IPage<Performance> pageList = performanceService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
 }
 }

+ 48 - 31
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/controller/PerformanceOptimizerController.java

@@ -64,7 +64,7 @@ public class PerformanceOptimizerController {
                                                              @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                                              @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                                              @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                              @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                              HttpServletRequest req) {
                                                              HttpServletRequest req) {
-        Result<IPage<PerformanceOptimizer>> result = new Result<IPage<PerformanceOptimizer>>();
+        Result<IPage<PerformanceOptimizer>> result = new Result<>();
         QueryWrapper<PerformanceOptimizer> queryWrapper = QueryGenerator.initQueryWrapper(performanceOptimizer, req.getParameterMap());
         QueryWrapper<PerformanceOptimizer> queryWrapper = QueryGenerator.initQueryWrapper(performanceOptimizer, req.getParameterMap());
         Page<PerformanceOptimizer> page = new Page<PerformanceOptimizer>(pageNo, pageSize);
         Page<PerformanceOptimizer> page = new Page<PerformanceOptimizer>(pageNo, pageSize);
         IPage<PerformanceOptimizer> pageList = performanceOptimizerService.page(page, queryWrapper);
         IPage<PerformanceOptimizer> pageList = performanceOptimizerService.page(page, queryWrapper);
@@ -73,36 +73,6 @@ public class PerformanceOptimizerController {
         return result;
         return result;
     }
     }
 
 
-    @GetMapping(value = "/detail")
-    @ResponseBody
-    public Map<String, Object> getPerformanceDetail(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                                    @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
-                                                    HttpServletRequest req, @RequestParam(name = "mediaType", defaultValue = "2") String mediaType) {
-        return performanceOptimizerService.getPerformanceDetail(mediaType, pageNo, pageSize);
-    }
-
-    @GetMapping(value = "/ranking/list")
-    @ResponseBody
-    public Map<String, Object> getRankingList(@RequestParam(name = "mediaType", defaultValue = "2") String mediaType,
-                                              @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                              @RequestParam(name = "pageSize", defaultValue = "3") Integer pageSize,
-                                              HttpServletRequest req) {
-        return performanceOptimizerService.getRankingList(mediaType, pageNo, pageSize);
-    }
-
-    /**
-     * 获取项目经理相关数据
-     *
-     * @param req
-     * @param mediaType
-     * @return
-     */
-    @GetMapping(value = "/manager/detail")
-    @ResponseBody
-    public Map<String, Object> getManagerPerformanceDetail(HttpServletRequest req, @RequestParam(name = "mediaType", defaultValue = "2") String mediaType) {
-        return performanceOptimizerService.getManagerPerformanceDetail(mediaType);
-    }
-
     /**
     /**
      * 添加
      * 添加
      *
      *
@@ -275,4 +245,51 @@ public class PerformanceOptimizerController {
         return Result.ok("文件导入失败!");
         return Result.ok("文件导入失败!");
     }
     }
 
 
+    /**
+     * 优化师绩效详情
+     *
+     * @param pageNo
+     * @param pageSize
+     * @param mediaType
+     * @return
+     */
+    @GetMapping(value = "/detail")
+    @ResponseBody
+    public Map<String, Object> getPerformanceDetail(@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                    @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                    @RequestParam(name = "mediaType", defaultValue = "2") String mediaType) {
+        return performanceOptimizerService.getPerformanceDetail(mediaType, pageNo, pageSize);
+    }
+
+    /**
+     * 优化师绩效排行榜
+     *
+     * @param mediaType
+     * @param pageNo
+     * @param pageSize
+     * @return
+     */
+    @GetMapping(value = "/ranking/list")
+    @ResponseBody
+    public Map<String, Object> getRankingList(@RequestParam(name = "mediaType", defaultValue = "2") String mediaType,
+                                              @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                              @RequestParam(name = "pageSize", defaultValue = "3") Integer pageSize,
+                                              @RequestParam(name = "orgCode", defaultValue = "A01") String orgCode) {
+        return performanceOptimizerService.getRankingList(mediaType, pageNo, pageSize, orgCode);
+    }
+
+    /**
+     * 获取项目经理相关数据
+     *
+     * @param req
+     * @param mediaType
+     * @return
+     */
+    @GetMapping(value = "/manager/detail")
+    @ResponseBody
+    public Map<String, Object> getManagerPerformanceDetail(@RequestParam(name = "orgCode", defaultValue = "A01") String orgCode,
+                                                           @RequestParam(name = "mediaType", defaultValue = "2") String mediaType) {
+        return performanceOptimizerService.getManagerPerformanceDetail(mediaType, orgCode);
+    }
+
 }
 }

+ 11 - 2
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/OptimizerConfig.java

@@ -10,6 +10,7 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 import lombok.experimental.Accessors;
 import org.jeecgframework.poi.excel.annotation.Excel;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
 
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.Date;
 
 
 /**
 /**
@@ -35,8 +36,8 @@ public class OptimizerConfig {
     /**
     /**
      * 媒体类型
      * 媒体类型
      */
      */
-    @Excel(name = "媒体类型", width = 15)
-    @ApiModelProperty(value = "媒体类型")
+    @Excel(name = "媒体类型1_头条2_快手", width = 15)
+    @ApiModelProperty(value = "媒体类型1_头条2_快手")
     private Integer appType;
     private Integer appType;
     /**
     /**
      * 媒体任务
      * 媒体任务
@@ -68,6 +69,14 @@ public class OptimizerConfig {
     @Excel(name = "是否有效", width = 15)
     @Excel(name = "是否有效", width = 15)
     @ApiModelProperty(value = "是否有效")
     @ApiModelProperty(value = "是否有效")
     private Integer enabled;
     private Integer enabled;
+
+    @Excel(name = "个人总任务", width = 15)
+    @ApiModelProperty(value = "个人总任务")
+    private BigDecimal totalPersonalTask;
+
+    @Excel(name = "机构代码", width = 15)
+    @ApiModelProperty(value = "机构代码")
+    private String orgCode;
     /**
     /**
      * createTime
      * createTime
      */
      */

+ 3 - 3
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/Performance.java

@@ -104,9 +104,9 @@ public class Performance {
     /**
     /**
      * 1_快手2_抖音
      * 1_快手2_抖音
      */
      */
-    @Excel(name = "媒体类型", width = 15)
-    @ApiModelProperty(value = "媒体类型")
-    @Dict(dicCode = "media_type")
+    @Excel(name = "媒体类型1_头条2_快手", width = 15)
+    @ApiModelProperty(value = "媒体类型1_头条2_快手")
+    @Dict(dicCode = "app_type")
     private Integer appType;
     private Integer appType;
     /**
     /**
      * 创建时间
      * 创建时间

+ 63 - 0
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/PerformanceConfig.java

@@ -0,0 +1,63 @@
+package cn.com.ctop.performanceappraisal.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+import java.util.Date;
+
+/**
+ * 绩效配置文件表
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2020-01-08
+ */
+@Data
+@TableName("ctop_performance_config")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_performance_config对象", description = "绩效配置文件表")
+public class PerformanceConfig {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.UUID)
+    @ApiModelProperty(value = "id")
+    private Integer id;
+    /**
+     * year
+     */
+    @Excel(name = "year", width = 15)
+    @ApiModelProperty(value = "year")
+    private Integer year;
+    /**
+     * quarter
+     */
+    @Excel(name = "quarter", width = 15)
+    @ApiModelProperty(value = "quarter")
+    private Integer quarter;
+    /**
+     * mediaTaskRaise
+     */
+    @Excel(name = "mediaTaskRaise", width = 15)
+    @ApiModelProperty(value = "mediaTaskRaise")
+    private Integer mediaTaskRaise;
+    /**
+     * createTime
+     */
+    @ApiModelProperty(value = "createTime")
+    private Date createTime;
+    /**
+     * updateTime
+     */
+    @ApiModelProperty(value = "updateTime")
+    private Date updateTime;
+}

+ 2 - 2
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/PerformanceOptimizer.java

@@ -72,8 +72,8 @@ public class PerformanceOptimizer {
     /**
     /**
      * 媒体类型
      * 媒体类型
      */
      */
-    @Excel(name = "媒体类型", width = 15)
-    @ApiModelProperty(value = "媒体类型")
+    @Excel(name = "媒体类型1_头条2_快手", width = 15)
+    @ApiModelProperty(value = "媒体类型1_头条2_快手")
     private Integer appType;
     private Integer appType;
     /**
     /**
      * createTime
      * createTime

+ 2 - 2
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/RolePerformancRraise.java

@@ -61,8 +61,8 @@ public class RolePerformancRraise {
     /**
     /**
      * 1:快手 2:头条
      * 1:快手 2:头条
      */
      */
-    @Excel(name = "媒体类型", width = 15)
-    @ApiModelProperty(value = "媒体类型")
+    @Excel(name = "媒体类型1_头条2_快手", width = 15)
+    @ApiModelProperty(value = "媒体类型1_头条2_快手")
     @Dict(dicCode = "media_type")
     @Dict(dicCode = "media_type")
     private Integer appType;
     private Integer appType;
     /**
     /**

+ 2 - 2
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/entity/RolePerformanceCommission.java

@@ -56,8 +56,8 @@ public class RolePerformanceCommission {
     /**
     /**
      * 1:快手  2:头条
      * 1:快手  2:头条
      */
      */
-    @Excel(name = "媒体类型", width = 15)
-    @ApiModelProperty(value = "媒体类型")
+    @Excel(name = "媒体类型1_头条2_快手", width = 15)
+    @ApiModelProperty(value = "媒体类型1_头条2_快手")
     @Dict(dicCode = "media_type")
     @Dict(dicCode = "media_type")
     private Integer appType;
     private Integer appType;
 
 

+ 15 - 0
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/mapper/PerformanceConfigMapper.java

@@ -0,0 +1,15 @@
+package cn.com.ctop.performanceappraisal.mapper;
+
+import cn.com.ctop.performanceappraisal.entity.PerformanceConfig;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 绩效配置文件表
+ *
+ * @author: jeecg-boot
+ * @date: 2020-01-08
+ * @cersion: V1.0
+ */
+public interface PerformanceConfigMapper extends BaseMapper<PerformanceConfig> {
+
+}

+ 14 - 5
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/mapper/PerformanceMapper.java

@@ -15,16 +15,25 @@ import java.util.List;
  * @cersion: V1.0
  * @cersion: V1.0
  */
  */
 public interface PerformanceMapper extends BaseMapper<Performance> {
 public interface PerformanceMapper extends BaseMapper<Performance> {
+    List<OptimizerCostDetailVO> getKuaishouOptimizerTotalCostDetailGroupByUserId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize);
 
 
-    List<OptimizerCostDetailVO> getOptimizerTotalCostDetailGroupByUserId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize);
+    List<OptimizerCostDetailVO> getBytedanceOptimizerTotalCostDetailGroupByUserId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize);
 
 
     List<OptimizerCostDetailVO> getOptimizerTotalCostDetailGroupByAccountId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize);
     List<OptimizerCostDetailVO> getOptimizerTotalCostDetailGroupByAccountId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize);
 
 
-    List<OptimizerCostDetailVO> getUserOptimizerTotalCostGroupByProjectId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize, @Param(value = "projectId") Long projectId);
+    List<OptimizerCostDetailVO> getKuaishouUserOptimizerTotalCostGroupByProjectId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize, @Param(value = "projectId") Long projectId);
 
 
-    List<OptimizerCostDetailVO> getUserOptimizerTotalCostGroupByAccountId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize, @Param(value = "projectId") Long projectId, @Param(value = "accountId") Long accountId);
+    List<OptimizerCostDetailVO> getBytedanceUserOptimizerTotalCostGroupByProjectId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize, @Param(value = "projectId") Long projectId);
 
 
-    List<OptimizerCostDetailVO> getMemberPerformanceByOrgCode(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "orgCode") String orgCode);
+    List<OptimizerCostDetailVO> getKuaishouUserOptimizerTotalCostGroupByAccountId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize, @Param(value = "projectId") Long projectId, @Param(value = "accountId") Long accountId);
 
 
-    OptimizerCostDetailVO getOptimizerTotalCost(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter);
+    List<OptimizerCostDetailVO> getBytedanceUserOptimizerTotalCostGroupByAccountId(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "userId") String userId, @Param(value = "startIndex") Integer startIndex, @Param(value = "pageSize") Integer pageSize, @Param(value = "projectId") Long projectId, @Param(value = "accountId") Long accountId);
+
+    List<OptimizerCostDetailVO> getKuaishouMemberPerformanceByOrgCode(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "orgCode") String orgCode);
+
+    List<OptimizerCostDetailVO> getBytedanceMemberPerformanceByOrgCode(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter, @Param(value = "orgCode") String orgCode);
+
+    OptimizerCostDetailVO getKuaishouOptimizerTotalCost(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter);
+
+    OptimizerCostDetailVO getBytedanceOptimizerTotalCost(@Param(value = "startDate") String startDate, @Param(value = "endDate") String endDate, @Param(value = "year") String year, @Param(value = "quarter") String quarter);
 }
 }

+ 5 - 0
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/mapper/xml/PerformanceConfigMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.com.ctop.performanceappraisal.mapper.PerformanceConfigMapper">
+
+</mapper>

+ 143 - 8
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/mapper/xml/PerformanceMapper.xml

@@ -12,7 +12,7 @@
         <result column="projectName" property="projectName"/>
         <result column="projectName" property="projectName"/>
         <result column="accountName" property="accountName"/>
         <result column="accountName" property="accountName"/>
     </resultMap>
     </resultMap>
-    <select id="getOptimizerTotalCostDetailGroupByUserId" resultMap="OptimizerTotalCostDetail">
+    <select id="getKuaishouOptimizerTotalCostDetailGroupByUserId" resultMap="OptimizerTotalCostDetail">
         SELECT
         SELECT
         sysUser.id as userId,sysUser.realname as realName,SUM(charge) as totalCost,#{year} AS year,#{quarter} as
         sysUser.id as userId,sysUser.realname as realName,SUM(charge) as totalCost,#{year} AS year,#{quarter} as
         quarter,2 as appType
         quarter,2 as appType
@@ -40,6 +40,34 @@
         limit #{startIndex},#{pageSize}
         limit #{startIndex},#{pageSize}
     </select>
     </select>
 
 
+    <select id="getBytedanceOptimizerTotalCostDetailGroupByUserId" resultMap="OptimizerTotalCostDetail">
+        SELECT
+        sysUser.id as userId,sysUser.realname as realName,SUM(dailiAccount.cost) as totalCost,
+        #{year} AS year,#{quarter} as quarter,1 as appType
+        FROM
+        ctop_bytedance_report_advertiser_daily dailyAccount
+        LEFT JOIN
+        ctop_user_allocation allocation ON dailyAccount.advertiser_id = allocation.account_id
+        LEFT JOIN
+        sys_user_role userRole ON userRole.user_id = allocation.user_id
+        LEFT JOIN
+        sys_user sysUser ON sysUser.id = userRole.user_id
+        WHERE
+        userRole.role_id = '79fba4f45f1b8e284af9c68311c6c771'
+        <if test="userId != null">
+            and sysUser.id = #{userId}
+        </if>
+        AND
+        dailyAccount.stat_datetime &gt;= #{startDate}
+        AND
+        dailyAccount.stat_datetime &lt; #{endDate}
+        GROUP BY
+        sysUser.id
+        ORDER BY
+        SUM(dailyAccount.cost) DESC
+        limit #{startIndex},#{pageSize}
+    </select>
+
     <select id="getOptimizerTotalCostDetailGroupByAccountId" resultMap="OptimizerTotalCostDetail">
     <select id="getOptimizerTotalCostDetailGroupByAccountId" resultMap="OptimizerTotalCostDetail">
         SELECT
         SELECT
         dailiAccount.account_id,sysUser.id as userId,sysUser.realname as realName,SUM(charge) as totalCost,#{year} AS
         dailiAccount.account_id,sysUser.id as userId,sysUser.realname as realName,SUM(charge) as totalCost,#{year} AS
@@ -68,11 +96,11 @@
         limit #{startIndex},#{pageSize}
         limit #{startIndex},#{pageSize}
     </select>
     </select>
 
 
-    <select id="getUserOptimizerTotalCostGroupByProjectId" resultMap="OptimizerTotalCostDetail">
+    <select id="getKuaishouUserOptimizerTotalCostGroupByProjectId" resultMap="OptimizerTotalCostDetail">
         SELECT
         SELECT
-        allocation.project_id as projectId,allocation.project_name as projectName,allocation.auth_name as
-        accountName,sysUser.id as
-        userId,sysUser.realname as realName,SUM(charge) as totalCost,#{year} AS year,#{quarter} as quarter,2 as appType
+        allocation.project_id as projectId,allocation.project_name as projectName,
+        allocation.auth_name as accountName,sysUser.id as userId,sysUser.realname as realName,
+        SUM(charge) as totalCost,#{year} AS year,#{quarter} as quarter,2 as appType
         FROM
         FROM
         ctop_kuaishou_report_daily_account dailiAccount
         ctop_kuaishou_report_daily_account dailiAccount
         LEFT JOIN
         LEFT JOIN
@@ -99,7 +127,40 @@
         SUM(charge) DESC
         SUM(charge) DESC
         limit #{startIndex},#{pageSize}
         limit #{startIndex},#{pageSize}
     </select>
     </select>
-    <select id="getUserOptimizerTotalCostGroupByAccountId" resultMap="OptimizerTotalCostDetail">
+
+    <select id="getBytedanceUserOptimizerTotalCostGroupByProjectId" resultMap="OptimizerTotalCostDetail">
+        SELECT
+        allocation.project_id as projectId,allocation.project_name as projectName,
+        allocation.auth_name as accountName,sysUser.id as userId,sysUser.realname as realName,
+        SUM(dailyAccount.cost) as totalCost,#{year} AS year,#{quarter} as quarter,1 as appType
+        FROM
+        ctop_bytedance_report_advertiser_daily dailyAccount
+        LEFT JOIN
+        ctop_user_allocation allocation ON dailyAccount.advertiser_id = allocation.account_id
+        LEFT JOIN
+        sys_user_role userRole ON userRole.user_id = allocation.user_id
+        LEFT JOIN
+        sys_user sysUser ON sysUser.id = userRole.user_id
+        WHERE
+        userRole.role_id = '79fba4f45f1b8e284af9c68311c6c771'
+        <if test="userId != null">
+            and sysUser.id = #{userId}
+        </if>
+        <if test="projectId != null">
+            and allocation.project_id = #{projectId}
+        </if>
+        AND
+        dailyAccount.stat_datetime &gt;= #{startDate}
+        AND
+        dailyAccount.stat_datetime &lt; #{endDate}
+        GROUP BY
+        allocation.project_id
+        ORDER BY
+        SUM(dailyAccount.cost) DESC
+        limit #{startIndex},#{pageSize}
+    </select>
+
+    <select id="getKuaishouUserOptimizerTotalCostGroupByAccountId" resultMap="OptimizerTotalCostDetail">
         SELECT
         SELECT
         allocation.project_id as projectId,allocation.project_name as projectName,allocation.auth_name as accountName
         allocation.project_id as projectId,allocation.project_name as projectName,allocation.auth_name as accountName
         ,sysUser.id as
         ,sysUser.id as
@@ -133,7 +194,41 @@
         limit #{startIndex},#{pageSize}
         limit #{startIndex},#{pageSize}
     </select>
     </select>
 
 
-    <select id="getOptimizerTotalCost" resultMap="OptimizerTotalCostDetail">
+    <select id="getBytedanceUserOptimizerTotalCostGroupByAccountId" resultMap="OptimizerTotalCostDetail">
+        SELECT
+        allocation.project_id as projectId,allocation.project_name as projectName,
+        allocation.auth_name as accountName,sysUser.id as userId,sysUser.realname as realName,
+        SUM(dailyAccount.cost) as totalCost,#{year} AS year,#{quarter} as quarter,1 as appType
+        FROM
+        ctop_bytedance_report_advertiser_daily dailyAccount
+        LEFT JOIN
+        ctop_user_allocation allocation ON dailyAccount.advertiser_id = allocation.account_id
+        LEFT JOIN
+        sys_user_role userRole ON userRole.user_id = allocation.user_id
+        LEFT JOIN
+        sys_user sysUser ON sysUser.id = userRole.user_id
+        WHERE
+        1=1
+        and
+        userRole.role_id = '79fba4f45f1b8e284af9c68311c6c771'
+        <if test="projectId != null">
+            and allocation.project_id = #{projectId}
+        </if>
+        <if test="userId != null">
+            and sysUser.id = #{userId}
+        </if>
+        AND
+        dailyAccount.stat_datetime &gt;= #{startDate}
+        AND
+        dailyAccount.stat_datetime &lt; #{endDate}
+        GROUP BY
+        allocation.account_id
+        ORDER BY
+        SUM(dailyAccount.cost) DESC
+        limit #{startIndex},#{pageSize}
+    </select>
+
+    <select id="getKuaishouOptimizerTotalCost" resultMap="OptimizerTotalCostDetail">
         SELECT
         SELECT
             '账户总计' as realname,SUM(charge) as totalCost,#{year} AS year,#{quarter} as quarter,2 as appType
             '账户总计' as realname,SUM(charge) as totalCost,#{year} AS year,#{quarter} as quarter,2 as appType
         FROM
         FROM
@@ -153,7 +248,27 @@
         GROUP BY userRole.role_id
         GROUP BY userRole.role_id
     </select>
     </select>
 
 
-    <select id="getMemberPerformanceByOrgCode" resultMap="OptimizerTotalCostDetail">
+    <select id="getBytedanceOptimizerTotalCost" resultMap="OptimizerTotalCostDetail">
+        SELECT
+            '账户总计' as realname,SUM(dailyAccount.cost) as totalCost,#{year} AS year,#{quarter} as quarter,1 as appType
+        FROM
+            ctop_bytedance_report_advertiser_daily dailyAccount
+        LEFT JOIN
+            ctop_user_allocation allocation ON dailyAccount.advertiser_id = allocation.account_id
+        LEFT JOIN
+            sys_user_role userRole ON userRole.user_id = allocation.user_id
+        LEFT JOIN
+            sys_user sysUser ON sysUser.id = userRole.user_id
+        WHERE
+            userRole.role_id = '79fba4f45f1b8e284af9c68311c6c771'
+        AND
+            dailyAccount.stat_date &gt;= #{startDate}
+        AND
+            dailyAccount.stat_date &lt; #{endDate}
+        GROUP BY userRole.role_id
+    </select>
+
+    <select id="getKuaishouMemberPerformanceByOrgCode" resultMap="OptimizerTotalCostDetail">
         SELECT
         SELECT
             sysUser.id as userId,sysUser.realname as realName,SUM(charge) as totalCost,#{year} AS year,#{quarter} as quarter,2 as appType
             sysUser.id as userId,sysUser.realname as realName,SUM(charge) as totalCost,#{year} AS year,#{quarter} as quarter,2 as appType
         FROM
         FROM
@@ -172,6 +287,26 @@
             sysUser.id
             sysUser.id
         ORDER BY
         ORDER BY
             SUM(charge) DESC
             SUM(charge) DESC
+    </select>
 
 
+    <select id="getBytedanceMemberPerformanceByOrgCode" resultMap="OptimizerTotalCostDetail">
+        SELECT
+            sysUser.id as userId,sysUser.realname as realName,SUM(dailyAccount.cost) as totalCost,#{year} AS year,#{quarter} as quarter,2 as appType
+        FROM
+            ctop_bytedance_report_advertiser_daily dailyAccount
+        LEFT JOIN
+            ctop_user_allocation allocation ON dailyAccount.advertiser_id = allocation.account_id
+        LEFT JOIN
+            sys_user_role userRole ON userRole.user_id = allocation.user_id
+        LEFT JOIN
+            sys_user sysUser ON sysUser.id = userRole.user_id
+        WHERE
+            userRole.role_id = '79fba4f45f1b8e284af9c68311c6c771'
+		AND
+			sysUser.org_code = #{orgCode}
+        GROUP BY
+            sysUser.id
+        ORDER BY
+            SUM(dailyAccount.cost) DESC
     </select>
     </select>
 </mapper>
 </mapper>

+ 1 - 1
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/IOptimizerConfigService.java

@@ -11,5 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @date 2019-12-13
  * @date 2019-12-13
  */
  */
 public interface IOptimizerConfigService extends IService<OptimizerConfig> {
 public interface IOptimizerConfigService extends IService<OptimizerConfig> {
-    OptimizerConfig getEnabledConfigByMediaType(String mediaType);
+    OptimizerConfig getEnabledConfigByMediaType(String mediaType, String orgCode);
 }
 }

+ 1 - 1
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/IOptimizerRoleInfoService.java

@@ -14,5 +14,5 @@ import java.util.Map;
  */
  */
 public interface IOptimizerRoleInfoService extends IService<OptimizerRoleInfo> {
 public interface IOptimizerRoleInfoService extends IService<OptimizerRoleInfo> {
 
 
-    Map<String, Object> getmanagerDetail(Integer appType);
+    Map<String, Object> getManagerDetail(String appType, String orgCode);
 }
 }

+ 16 - 0
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/IPerformanceConfigService.java

@@ -0,0 +1,16 @@
+package cn.com.ctop.performanceappraisal.service;
+
+import cn.com.ctop.performanceappraisal.entity.PerformanceConfig;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 绩效配置文件表
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2020-01-08
+ */
+public interface IPerformanceConfigService extends IService<PerformanceConfig> {
+
+    PerformanceConfig getNowConfig();
+}

+ 2 - 2
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/IPerformanceOptimizerService.java

@@ -16,7 +16,7 @@ public interface IPerformanceOptimizerService extends IService<PerformanceOptimi
 
 
     Map<String, Object> getPerformanceDetail(String mediaType, Integer pageNo, Integer pageSize);
     Map<String, Object> getPerformanceDetail(String mediaType, Integer pageNo, Integer pageSize);
 
 
-    Map<String, Object> getRankingList(String mediaType, Integer pageNo, Integer pageSize);
+    Map<String, Object> getRankingList(String mediaType, Integer pageNo, Integer pageSize, String orgCode);
 
 
-    Map<String, Object> getManagerPerformanceDetail(String mediaType);
+    Map<String, Object> getManagerPerformanceDetail(String mediaType, String orgCode);
 }
 }

+ 5 - 4
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/IPerformanceService.java

@@ -25,13 +25,14 @@ public interface IPerformanceService extends IService<Performance> {
     /**
     /**
      * 获取优化师总消耗数据信息
      * 获取优化师总消耗数据信息
      */
      */
-    List<OptimizerCostDetailVO> getOptimizerTotalCostDetailGroupByUserId(String userId, Integer startIndex, Integer pageSize);
+    List<OptimizerCostDetailVO> getOptimizerTotalCostDetailGroupByUserId(String mediaType, String userId, Integer startIndex, Integer pageSize);
 
 
-    OptimizerCostDetailVO getOptimizerTotalCost();
+    OptimizerCostDetailVO getOptimizerTotalCost(String mediaType);
 
 
-    Map<String, Object> getUserOptimizerProjectList(Integer pageNo, Integer pageSize);
+    Map<String, Object> getUserOptimizerProjectList(Integer pageNo, Integer pageSize, String appType);
 
 
-    Map<String, Object> getUserOptimizerAccountList(Long projectId, Integer pageNo, Integer pageSize);
+    Map<String, Object> getUserOptimizerAccountList(String apptype, Long projectId, Integer pageNo, Integer pageSize);
 
 
     Map<String, Object> getMemberPerformanceByUserId(OptimizerConfig config, OptimizerCostDetailVO totalCostVo);
     Map<String, Object> getMemberPerformanceByUserId(OptimizerConfig config, OptimizerCostDetailVO totalCostVo);
+
 }
 }

+ 0 - 0
performance-appraisal/src/main/java/cn/com/ctop/performanceappraisal/service/impl/OptimizerConfigServiceImpl.java


部分文件因为文件数量过多而无法显示