Procházet zdrojové kódy

bug fix on 2020.05.22

jiequan.bi před 5 roky
rodič
revize
a297b375b3
100 změnil soubory, kde provedl 446 přidání a 926 odebrání
  1. 12 2
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java
  2. 5 0
      jeecg-boot-module-system/pom.xml
  3. 6 0
      jeecg-boot-module-system/src/main/java/org/jeecg/JeecgApplication.java
  4. 4 4
      jeecg-boot-module-system/src/main/java/org/jeecg/config/MybatisPlusConfig.java
  5. 6 0
      jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java
  6. 4 4
      jeecg-boot-module-system/src/main/java/org/jeecg/config/WebMvcConfiguration.java
  7. 17 5
      jeecg-boot-module-system/src/main/resources/application-test.yml
  8. 2 1
      jeecg-boot-module-system/src/main/resources/application.yml
  9. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/BindAccountAuthServiceImpl.java
  10. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/BindAccountLoginServiceImpl.java
  11. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/CorpWeixinServiceImpl.java
  12. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/CtopCorpWexinUserServiceImpl.java
  13. 3 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/CtopOauthTokenServiceImpl.java
  14. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/FileInfoServiceImpl.java
  15. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/IpPoolServiceImpl.java
  16. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MailLogServiceImpl.java
  17. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialAscriptionServiceImpl.java
  18. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialCutFrameServiceImpl.java
  19. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialImageInfoServiceImpl.java
  20. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java
  21. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialParameterServiceImpl.java
  22. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialTagServiceImpl.java
  23. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/RefreshTokenServiceImpl.java
  24. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/SysRoleServiceImpl.java
  25. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/UserAllocationServiceImpl.java
  26. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/VideoMergeTaskServiceImpl.java
  27. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/VideoPartServiceImpl.java
  28. 2 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/VideoWatermarkTaskServiceImpl.java
  29. 3 1
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/VideoWatermarkTemplateServiceImpl.java
  30. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/account/service/impl/KuaishouAdAccountServiceImpl.java
  31. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/account/service/impl/KuaishouAppAccountServiceImpl.java
  32. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/account/service/impl/KuaishouIosAccountServiceImpl.java
  33. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/core/service/impl/KuaishouCrawlerServiceImpl.java
  34. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeAdArtStyleServiceImpl.java
  35. 2 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeCompanyProductServiceImpl.java
  36. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeCompanyServiceImpl.java
  37. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeLabelServiceImpl.java
  38. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeMediaServiceImpl.java
  39. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyePlayRulesServiceImpl.java
  40. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeProductAdArtStyleServiceImpl.java
  41. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeProductPlayRuleServiceImpl.java
  42. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeProductServiceImpl.java
  43. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeProductThemeServiceImpl.java
  44. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeThemesServiceImpl.java
  45. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/kuaishoucce/service/impl/KuaishouEffectAdInfoServiceImpl.java
  46. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/kuaishoucce/service/impl/KuaishouHotPhotoInfoServiceImpl.java
  47. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/kuaishoucce/service/impl/KuaishouInspiredAdServiceImpl.java
  48. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/log/service/impl/CrawlerLogServiceImpl.java
  49. 1 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/oceanengine/service/impl/DouyinHotServiceImpl.java
  50. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/oceanengine/service/impl/EffectCaseServiceImpl.java
  51. 3 0
      module-crawler/src/main/java/cn/com/ctop/crawler/modules/oceanengine/service/impl/HotMaterialServiceImpl.java
  52. 3 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/app/service/impl/AppAdServiceImpl.java
  53. 3 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/app/service/impl/AppVideoServiceImpl.java
  54. 3 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/app/service/impl/KuaishouAppProductServiceImpl.java
  55. 3 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/app/service/impl/KuaishouAppServiceImpl.java
  56. 2 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceAdvertisePlanServiceImpl.java
  57. 2 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceAdvertiserDataServiceImpl.java
  58. 2 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceAdvertiserServiceImpl.java
  59. 2 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceCampaignServiceImpl.java
  60. 2 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceCreativeMaterialServiceImpl.java
  61. 2 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceCreativeServiceImpl.java
  62. 2 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceVideoInfoServiceImpl.java
  63. 2 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/BytedanceCleanMaterialServiceImpl.java
  64. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ByteDanceCleanMaterialReportServiceImpl.java
  65. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ByteDanceHourlyAccountWarningServiceImpl.java
  66. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceAdvertiserDailyReportServiceImpl.java
  67. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceAdvertiserHourlyReportServiceImpl.java
  68. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceCampaignDailyReportServiceImpl.java
  69. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceCampaignHourlyReportServiceImpl.java
  70. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceCreativeDailyReportServiceImpl.java
  71. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceCreativeHourlyReportServiceImpl.java
  72. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceDailyReportTaskServiceImpl.java
  73. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceFundDailyServiceImpl.java
  74. 204 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceHomepageReportServiceImpl.java
  75. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedancePlanDailyReportServiceImpl.java
  76. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedancePlanHourlyReportServiceImpl.java
  77. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportMaterialDailyServiceImpl.java
  78. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportMaterialRetryServiceImpl.java
  79. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportServiceImpl.java
  80. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ReportServiceImpl.java
  81. 0 37
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/ByteDanceCleanMaterialJob.java
  82. 0 47
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/ByteDanceHourlyAccountWarningLoadJob.java
  83. 3 0
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceAdvertiserDailyReportLoadJob.java
  84. 0 58
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceAdvertiserHourlyReportLoadJob.java
  85. 0 59
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceAdvertisingDataLoadJob.java
  86. 0 48
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceCreativeDailyReportLoadJob.java
  87. 0 59
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceCreativeHourlyReportLoadJob.java
  88. 0 105
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedancePlanDailyReportLoadJob.java
  89. 0 79
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedancePlanHourlyReportLoadJob.java
  90. 0 34
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedancePlanLoadJob.java
  91. 0 42
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedancePlanRealTimeLoadJob.java
  92. 0 34
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceSameDayCreativeLoadJob.java
  93. 0 31
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceVideoInfoLoadJob.java
  94. 0 33
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouCampaignJob.java
  95. 0 45
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyAccountReportLoadJob.java
  96. 0 44
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyCampaignReportLoadJob.java
  97. 0 63
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyCreativeReportLoadJob.java
  98. 0 44
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyGroupReportLoadJob.java
  99. 0 46
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyLoadFileJob.java
  100. 0 0
      xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyReportTaskJob.java

+ 12 - 2
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java

@@ -1,5 +1,7 @@
 package org.jeecg.common.util;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.util.StringUtils;
 
 import java.beans.PropertyEditorSupport;
@@ -17,6 +19,9 @@ import java.util.*;
  * @Version 1.0
  */
 public class DateUtils extends PropertyEditorSupport {
+
+    private static Logger logger= LoggerFactory.getLogger(DateUtils.class);
+
     /**
      * 以毫秒表示的时间
      */
@@ -880,10 +885,15 @@ public class DateUtils extends PropertyEditorSupport {
     }
 
 
-    public static String getMonthBefore(String format, String nowTime, int amount) throws ParseException {
+    public static String getMonthBefore(String format, String nowTime, int amount) {
         // 获取当前时间
         SimpleDateFormat dateFormat = new SimpleDateFormat(format);
-        Date date = dateFormat.parse(nowTime);
+        Date date = null;
+        try {
+            date = dateFormat.parse(nowTime);
+        } catch (ParseException e) {
+            logger.error(e.getMessage(),e);
+        }
 
         //得到日历
         Calendar calendar = Calendar.getInstance();

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

@@ -151,6 +151,11 @@
             <artifactId>opencv</artifactId>
             <version>4.2.0</version>
         </dependency>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper</artifactId>
+            <version>5.1.11</version>
+        </dependency>
     </dependencies>
 
     <dependencyManagement>

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

@@ -1,6 +1,7 @@
 package org.jeecg;
 
 import cn.com.ctop.common.module.utils.SpringUtils;
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -43,4 +44,9 @@ public class JeecgApplication {
         return new RestTemplate();
     }
 
+    @Bean
+    public PaginationInterceptor paginationInterceptor() {
+        return new PaginationInterceptor();
+    }
+
 }

+ 4 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/config/MybatisPlusConfig.java

@@ -1,6 +1,7 @@
 package org.jeecg.config;
 
 import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.PerformanceInterceptor;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -11,17 +12,17 @@ import org.springframework.context.annotation.Configuration;
  *
  */
 @Configuration
-@MapperScan(value = {"org.jeecg.modules.**.mapper*", "cn.com.ctop.**.mapper*", "cn.com.ctop.bytedance.mapper*"})
+@MapperScan(value = {"org.jeecg.modules.**.mapper*", "cn.com.ctop.**.mapper*"})
 
 public class MybatisPlusConfig {
 
     /**
          *  分页插件
      */
-    @Bean
+    /*@Bean
     public PaginationInterceptor paginationInterceptor() {
         return new PaginationInterceptor();
-    }
+    }*/
 
 //    /**
 //     * mybatis-plus SQL执行效率插件【生产环境可以关闭】
@@ -31,5 +32,4 @@ public class MybatisPlusConfig {
 //        return new PerformanceInterceptor();
 //    }
 
-
 }

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

@@ -78,6 +78,12 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/ctop/kuaishouChannelRegInfo/*", "anon");
 
 
+		filterChainDefinitionMap.put("/ctop/byteDance/homePage/report/*", "anon");
+		filterChainDefinitionMap.put("/ctop/material/top/cost", "anon");
+
+
+
+
 		//优化师相关
 		//filterChainDefinitionMap.put("/ctop/performanceOptimizer/detail", "anon");
 		//filterChainDefinitionMap.put("/ctop/performanceOptimizer/ranking/list", "anon");

+ 4 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/config/WebMvcConfiguration.java

@@ -33,10 +33,10 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
 	@Value("${spring.resource.static-locations}")
 	private String staticLocations;
 
-	@Override
-	public void addInterceptors(InterceptorRegistry registry) {
-		registry.addInterceptor(browseLogHandelInterceptor);
-	}
+//	@Override
+//	public void addInterceptors(InterceptorRegistry registry) {
+//		registry.addInterceptor(browseLogHandelInterceptor);
+//	}
 
 	@Bean
 	public CorsFilter corsFilter() {

+ 17 - 5
jeecg-boot-module-system/src/main/resources/application-test.yml

@@ -1,5 +1,5 @@
 server:
-  port: 8080
+  port: 8088
   ip: 39.106.184.70
   servlet:
     context-path: /jeecg-boot
@@ -95,9 +95,14 @@ spring:
         filters: stat,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: hcst
+#          password: test@20190531
       datasource:
         master:
-          url: jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+          url: jdbc:mysql://39.97.120.42:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
           username: hcst
           password: test@20190531
           driver-class-name: com.mysql.jdbc.Driver
@@ -131,9 +136,16 @@ mybatis-plus:
       id-type: 4
       # 默认数据库表下划线命名
       table-underline: true
-    configuration:
-      # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
-      log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+    # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
+      #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  #分页pageHelper
+pagehelper:
+  helper-dialect: mysql
+  reasonable: true
+  support-methods-arguments: true
 #jeecg专用配置
 jeecg:
   ffmpeg:

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

@@ -1,6 +1,6 @@
 spring:
   profiles:
-    active: @activatedProperties@
+    active: test
   application:
     name: system-web
 eureka:
@@ -13,3 +13,4 @@ swagger:
     enable: true
     username: jeecg
     password: jeecg1314
+

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/BindAccountAuthServiceImpl.java

@@ -9,6 +9,7 @@ import cn.com.ctop.common.module.utils.PropertiesUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.io.UnsupportedEncodingException;
@@ -25,6 +26,7 @@ import java.util.Map;
  */
 @Slf4j
 @Service
+@Primary
 public class BindAccountAuthServiceImpl extends ServiceImpl<BindAccountAuthMapper, BindAccountAuth> implements IBindAccountAuthService {
 
     @Autowired

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/BindAccountLoginServiceImpl.java

@@ -6,6 +6,7 @@ import cn.com.ctop.common.module.service.IBindAccountLoginService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -16,6 +17,7 @@ import org.springframework.stereotype.Service;
  */
 @Slf4j
 @Service
+@Primary
 public class BindAccountLoginServiceImpl extends ServiceImpl<BindAccountLoginMapper, BindAccountLogin> implements IBindAccountLoginService {
     @Override
     public BindAccountLogin selectByAccountId(String accountId) {

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/CorpWeixinServiceImpl.java

@@ -8,10 +8,12 @@ import me.chanjar.weixin.cp.api.impl.WxCpOAuth2ServiceImpl;
 import me.chanjar.weixin.cp.api.impl.WxCpServiceImpl;
 import me.chanjar.weixin.cp.bean.WxCpMessage;
 import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Slf4j
 @Service
+@Primary
 public class CorpWeixinServiceImpl implements ICorpWeixinService {
     public static void main(String[] args) {
         val configStorage = new WxCpDefaultConfigImpl();

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/CtopCorpWexinUserServiceImpl.java

@@ -3,6 +3,7 @@ package cn.com.ctop.common.module.service.impl;
 import cn.com.ctop.common.module.entity.CtopCorpWexinUser;
 import cn.com.ctop.common.module.mapper.CtopCorpWexinUserMapper;
 import cn.com.ctop.common.module.service.ICtopCorpWexinUserService;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -15,6 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  * @date 2019-12-08
  */
 @Service
+@Primary
 public class CtopCorpWexinUserServiceImpl extends ServiceImpl<CtopCorpWexinUserMapper, CtopCorpWexinUser> implements ICtopCorpWexinUserService {
 
 }

+ 3 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/CtopOauthTokenServiceImpl.java

@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
@@ -26,7 +27,9 @@ import java.util.Map;
  */
 @Slf4j
 @Service
+@Primary
 public class CtopOauthTokenServiceImpl extends ServiceImpl<CtopOauthTokenMapper, CtopOauthToken> implements ICtopOauthTokenService {
+
     @Autowired
     private CtopOauthTokenMapper cTopOauthTokenMapper;
 

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/FileInfoServiceImpl.java

@@ -23,6 +23,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClientBuilder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.io.*;
@@ -41,6 +42,7 @@ import java.util.Map;
  */
 @Slf4j
 @Service
+@Primary
 public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> implements IFileInfoService {
     @Value("${jeecg.path.image-upload}")
     private String imageUploadPath;

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/IpPoolServiceImpl.java

@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
@@ -22,6 +23,7 @@ import java.util.List;
  */
 @Slf4j
 @Service
+@Primary
 public class IpPoolServiceImpl extends ServiceImpl<IpPoolMapper, IpPool> implements IIpPoolService {
 
     @Override

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MailLogServiceImpl.java

@@ -7,6 +7,7 @@ import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.CorpWexinUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -17,6 +18,7 @@ import org.springframework.stereotype.Service;
  * @date 2019-12-08
  */
 @Service
+@Primary
 public class MailLogServiceImpl extends ServiceImpl<MailLogMapper, MailLog> implements IMailLogService {
     @Autowired
     private MailLogMapper mailLogMapper;

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialAscriptionServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.common.module.entity.MaterialAscription;
 import cn.com.ctop.common.module.mapper.MaterialAscriptionMapper;
 import cn.com.ctop.common.module.service.IMaterialAscriptionService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -14,6 +15,7 @@ import org.springframework.stereotype.Service;
  * @date 2019-11-23
  */
 @Service
+@Primary
 public class MaterialAscriptionServiceImpl extends ServiceImpl<MaterialAscriptionMapper, MaterialAscription> implements IMaterialAscriptionService {
 
 }

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialCutFrameServiceImpl.java

@@ -15,6 +15,7 @@ import com.aliyuncs.mts.model.v20140618.SubmitSnapshotJobRequest;
 import com.aliyuncs.mts.model.v20140618.SubmitSnapshotJobResponse;
 import com.aliyuncs.profile.DefaultProfile;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.io.IOException;
@@ -29,6 +30,7 @@ import java.net.URLEncoder;
  * @date 2019-12-25
  */
 @Service
+@Primary
 public class MaterialCutFrameServiceImpl extends ServiceImpl<MaterialCutFrameMapper, MaterialCutFrame> implements IMaterialCutFrameService {
 
     private static String ossLocation = "oss-cn-beijing";

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialImageInfoServiceImpl.java

@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import javax.imageio.ImageIO;
@@ -34,6 +35,7 @@ import java.util.Map;
  */
 @Slf4j
 @Service
+@Primary
 public class MaterialImageInfoServiceImpl extends ServiceImpl<MaterialImageInfoMapper, MaterialImageInfo> implements IMaterialImageInfoService {
 
     @Value("${oss.replace.download}")

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java

@@ -17,6 +17,7 @@ import it.sauronsoftware.jave.EncoderException;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -41,6 +42,7 @@ import java.util.regex.Pattern;
  */
 @Slf4j
 @Service
+@Primary
 public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, MaterialInfo> implements IMaterialInfoService {
     private static ExecutorService uploadExecutorService = Executors.newFixedThreadPool(5);
     @Resource

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialParameterServiceImpl.java

@@ -5,6 +5,7 @@ import cn.com.ctop.common.module.mapper.MaterialParameterMapper;
 import cn.com.ctop.common.module.service.IMaterialParameterService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -15,6 +16,7 @@ import org.springframework.stereotype.Service;
  * @date 2019-11-23
  */
 @Service
+@Primary
 public class MaterialParameterServiceImpl extends ServiceImpl<MaterialParameterMapper, MaterialParameter> implements IMaterialParameterService {
 
     @Override

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialTagServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.common.module.entity.MaterialTag;
 import cn.com.ctop.common.module.mapper.MaterialTagMapper;
 import cn.com.ctop.common.module.service.IMaterialTagService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -14,6 +15,7 @@ import org.springframework.stereotype.Service;
  * @date 2019-11-23
  */
 @Service
+@Primary
 public class MaterialTagServiceImpl extends ServiceImpl<MaterialTagMapper, MaterialTag> implements IMaterialTagService {
 
 }

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/RefreshTokenServiceImpl.java

@@ -8,12 +8,14 @@ import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
 
 @Slf4j
 @Service
+@Primary
 public class RefreshTokenServiceImpl implements IRefreshTokenService {
     @Autowired
     private CtopOauthTokenMapper oauthTokenMapper;

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/SysRoleServiceImpl.java

@@ -5,6 +5,7 @@ import cn.com.ctop.common.module.mapper.SysRoleMapper;
 import cn.com.ctop.common.module.service.ISysRoleService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -16,6 +17,7 @@ import org.springframework.stereotype.Service;
  * @since 2018-12-19
  */
 @Service
+@Primary
 public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements ISysRoleService {
     @Autowired
     private SysRoleMapper sysRoleMapper;

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/UserAllocationServiceImpl.java

@@ -5,6 +5,7 @@ import cn.com.ctop.common.module.mapper.UserAllocationMapper;
 import cn.com.ctop.common.module.service.IUserAllocationService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -16,6 +17,7 @@ import java.util.List;
  * @Version: V1.0
  */
 @Service
+@Primary
 public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper, UserAllocation> implements IUserAllocationService {
 
     @Override

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/VideoMergeTaskServiceImpl.java

@@ -3,6 +3,7 @@ package cn.com.ctop.common.module.service.impl;
 import cn.com.ctop.common.module.entity.VideoMergeTask;
 import cn.com.ctop.common.module.mapper.VideoMergeTaskMapper;
 import cn.com.ctop.common.module.service.IVideoMergeTaskService;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -14,6 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  * @version V1.0
  */
 @Service
+@Primary
 public class VideoMergeTaskServiceImpl extends ServiceImpl<VideoMergeTaskMapper, VideoMergeTask> implements IVideoMergeTaskService {
 
 }

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/VideoPartServiceImpl.java

@@ -3,6 +3,7 @@ package cn.com.ctop.common.module.service.impl;
 import cn.com.ctop.common.module.entity.VideoPart;
 import cn.com.ctop.common.module.mapper.VideoPartMapper;
 import cn.com.ctop.common.module.service.IVideoPartService;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -14,6 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  * @version V1.0
  */
 @Service
+@Primary
 public class VideoPartServiceImpl extends ServiceImpl<VideoPartMapper, VideoPart> implements IVideoPartService {
 
 }

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/VideoWatermarkTaskServiceImpl.java

@@ -3,6 +3,7 @@ package cn.com.ctop.common.module.service.impl;
 import cn.com.ctop.common.module.entity.VideoWatermarkTask;
 import cn.com.ctop.common.module.mapper.VideoWatermarkTaskMapper;
 import cn.com.ctop.common.module.service.IVideoWatermarkTaskService;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -14,6 +15,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  * @version V1.0
  */
 @Service
+@Primary
 public class VideoWatermarkTaskServiceImpl extends ServiceImpl<VideoWatermarkTaskMapper, VideoWatermarkTask> implements IVideoWatermarkTaskService {
 
 }

+ 3 - 1
module-common/src/main/java/cn/com/ctop/common/module/service/impl/VideoWatermarkTemplateServiceImpl.java

@@ -3,6 +3,7 @@ package cn.com.ctop.common.module.service.impl;
 import cn.com.ctop.common.module.entity.VideoWatermarkTemplate;
 import cn.com.ctop.common.module.mapper.VideoWatermarkTemplateMapper;
 import cn.com.ctop.common.module.service.IVideoWatermarkTemplateService;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -13,7 +14,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  * @date   2019-12-20
  * @version V1.0
  */
-@Service("videoWatermarkTemplateService")
+@Service
+@Primary
 public class VideoWatermarkTemplateServiceImpl extends ServiceImpl<VideoWatermarkTemplateMapper, VideoWatermarkTemplate> implements IVideoWatermarkTemplateService {
 
 }

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/account/service/impl/KuaishouAdAccountServiceImpl.java

@@ -5,11 +5,14 @@ import cn.com.ctop.crawler.modules.account.mapper.KuaishouAdAccountMapper;
 import cn.com.ctop.crawler.modules.account.service.IKuaishouAdAccountService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
 
 @Service
+@Primary
+
 public class KuaishouAdAccountServiceImpl extends ServiceImpl<KuaishouAdAccountMapper, KuaishouAdAccount> implements IKuaishouAdAccountService {
     @Autowired
     private KuaishouAdAccountMapper kuaishouAdAccountMapper;

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/account/service/impl/KuaishouAppAccountServiceImpl.java

@@ -4,8 +4,11 @@ import cn.com.ctop.crawler.modules.account.entity.KuaishouAppAccount;
 import cn.com.ctop.crawler.modules.account.mapper.KuaishouAppAccountMapper;
 import cn.com.ctop.crawler.modules.account.service.IKuaishouAppAccountService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
+
 public class KuaishouAppAccountServiceImpl extends ServiceImpl<KuaishouAppAccountMapper, KuaishouAppAccount> implements IKuaishouAppAccountService {
 }

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/account/service/impl/KuaishouIosAccountServiceImpl.java

@@ -7,8 +7,11 @@ import cn.com.ctop.crawler.modules.account.mapper.KuaishouIosAccountMapper;
 import cn.com.ctop.crawler.modules.account.service.IKuaishouAppAccountService;
 import cn.com.ctop.crawler.modules.account.service.IKuaishouIosAccountService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
+
 public class KuaishouIosAccountServiceImpl extends ServiceImpl<KuaishouIosAccountMapper, KuaishouIosAccount> implements IKuaishouIosAccountService {
 }

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/core/service/impl/KuaishouCrawlerServiceImpl.java

@@ -10,11 +10,14 @@ import cn.com.ctop.crawler.modules.core.service.IKuaishouCrawlerService;
 import cn.com.ctop.crawler.modules.core.util.KuaishouUtil;
 import cn.com.ctop.crawler.modules.log.entity.CrawlerLog;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.Random;
 
 @Service
+@Primary
+
 public class KuaishouCrawlerServiceImpl implements IKuaishouCrawlerService {
     @Autowired
     private IIpPoolService iIpPoolService;

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeAdArtStyleServiceImpl.java

@@ -4,8 +4,11 @@ import cn.com.ctop.crawler.modules.dataeye.entity.DataeyeAdArtStyle;
 import cn.com.ctop.crawler.modules.dataeye.mapper.DataeyeAdArtStyleMapper;
 import cn.com.ctop.crawler.modules.dataeye.service.DataeyeAdArtStyleService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
+
 public class DataeyeAdArtStyleServiceImpl extends ServiceImpl<DataeyeAdArtStyleMapper, DataeyeAdArtStyle> implements DataeyeAdArtStyleService {
 }

+ 2 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeCompanyProductServiceImpl.java

@@ -4,8 +4,10 @@ import cn.com.ctop.crawler.modules.dataeye.entity.DataeyeCompanyProduct;
 import cn.com.ctop.crawler.modules.dataeye.mapper.DataeyeCompanyProductMapper;
 import cn.com.ctop.crawler.modules.dataeye.service.DataeyeCompanyProductService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
 public class DataeyeCompanyProductServiceImpl extends ServiceImpl<DataeyeCompanyProductMapper, DataeyeCompanyProduct> implements DataeyeCompanyProductService {
 }

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeCompanyServiceImpl.java

@@ -10,6 +10,7 @@ import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.io.IOException;
@@ -17,6 +18,8 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 @Service
+@Primary
+
 public class DataeyeCompanyServiceImpl extends ServiceImpl<DataeyeCompanyMapper, DataeyeCompany> implements DataeyeCompanyService {
     @Autowired
     private DataeyeProductService dataeyeProductService;

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeLabelServiceImpl.java

@@ -17,12 +17,15 @@ import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.io.IOException;
 import java.util.List;
 
 @Service
+@Primary
+
 public class DataeyeLabelServiceImpl implements DataeyeLabelService {
     @Autowired
     private DataeyeAdArtStyleService dataeyeAdArtStyleService;

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeMediaServiceImpl.java

@@ -12,12 +12,15 @@ import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import io.swagger.models.auth.In;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.io.IOException;
 import java.util.*;
 
 @Service
+@Primary
+
 public class DataeyeMediaServiceImpl extends ServiceImpl<DataeyeMediaMapper, DataeyeMedia> implements DataeyeMediaService {
     @Autowired
     private DataeyeCompanyService dataeyeCompanyService;

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyePlayRulesServiceImpl.java

@@ -4,8 +4,11 @@ import cn.com.ctop.crawler.modules.dataeye.entity.DataeyePlayRules;
 import cn.com.ctop.crawler.modules.dataeye.mapper.DataeyePlayRulesMapper;
 import cn.com.ctop.crawler.modules.dataeye.service.DataeyePlayRulesService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
+
 public class DataeyePlayRulesServiceImpl extends ServiceImpl<DataeyePlayRulesMapper, DataeyePlayRules> implements DataeyePlayRulesService{
 }

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeProductAdArtStyleServiceImpl.java

@@ -6,8 +6,11 @@ import cn.com.ctop.crawler.modules.dataeye.service.DataeyeAdArtStyleService;
 import cn.com.ctop.crawler.modules.dataeye.service.DataeyePlayRulesService;
 import cn.com.ctop.crawler.modules.dataeye.service.DataeyeProductAdArtStyleService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
+
 public class DataeyeProductAdArtStyleServiceImpl extends ServiceImpl<DataeyeProductAdArtStyleMapper, DataeyeProductAdArtStyle> implements DataeyeProductAdArtStyleService {
 }

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeProductPlayRuleServiceImpl.java

@@ -4,8 +4,11 @@ import cn.com.ctop.crawler.modules.dataeye.entity.DataeyeProductPlayRule;
 import cn.com.ctop.crawler.modules.dataeye.mapper.DataeyeProductPlayRuleMapper;
 import cn.com.ctop.crawler.modules.dataeye.service.DataeyeProductPlayRuleService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
+
 public class DataeyeProductPlayRuleServiceImpl extends ServiceImpl<DataeyeProductPlayRuleMapper, DataeyeProductPlayRule> implements DataeyeProductPlayRuleService{
 }

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeProductServiceImpl.java

@@ -12,6 +12,7 @@ import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 import us.codecraft.webmagic.thread.CountableThreadPool;
 
@@ -24,6 +25,8 @@ import java.util.concurrent.LinkedBlockingQueue;
 import java.util.logging.Logger;
 
 @Service
+@Primary
+
 public class DataeyeProductServiceImpl extends ServiceImpl<DataeyeProductMapper, DataeyeProduct> implements DataeyeProductService {
     @Autowired
     private DataeyeProductThemeService dataeyeProductThemeService;

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeProductThemeServiceImpl.java

@@ -4,8 +4,11 @@ import cn.com.ctop.crawler.modules.dataeye.entity.DataeyeProductTheme;
 import cn.com.ctop.crawler.modules.dataeye.mapper.DataeyeProductThemeMapper;
 import cn.com.ctop.crawler.modules.dataeye.service.DataeyeProductThemeService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
+
 public class DataeyeProductThemeServiceImpl extends ServiceImpl<DataeyeProductThemeMapper, DataeyeProductTheme> implements DataeyeProductThemeService {
 }

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/dataeye/service/impl/DataeyeThemesServiceImpl.java

@@ -5,8 +5,11 @@ import cn.com.ctop.crawler.modules.dataeye.mapper.DataeyeCompanyMapper;
 import cn.com.ctop.crawler.modules.dataeye.mapper.DataeyeThemesMapper;
 import cn.com.ctop.crawler.modules.dataeye.service.DataeyeThemesService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
+
 public class DataeyeThemesServiceImpl extends ServiceImpl<DataeyeThemesMapper, DataeyeThemes> implements DataeyeThemesService {
 }

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/kuaishoucce/service/impl/KuaishouEffectAdInfoServiceImpl.java

@@ -5,6 +5,7 @@ import cn.com.ctop.crawler.modules.kuaishoucce.mapper.KuaishouEffectAdInfoMapper
 import cn.com.ctop.crawler.modules.kuaishoucce.service.IKuaishouEffectAdInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -17,6 +18,8 @@ import java.util.List;
  * @date 2020-03-02
  */
 @Service
+@Primary
+
 public class KuaishouEffectAdInfoServiceImpl extends ServiceImpl<KuaishouEffectAdInfoMapper, KuaishouEffectAdInfo> implements IKuaishouEffectAdInfoService {
     @Autowired
     private KuaishouEffectAdInfoMapper adInfoMapper;

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/kuaishoucce/service/impl/KuaishouHotPhotoInfoServiceImpl.java

@@ -5,6 +5,7 @@ import cn.com.ctop.crawler.modules.kuaishoucce.mapper.KuaishouHotPhotoInfoMapper
 import cn.com.ctop.crawler.modules.kuaishoucce.service.IKuaishouHotPhotoInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -17,6 +18,8 @@ import java.util.List;
  * @date 2020-03-03
  */
 @Service
+@Primary
+
 public class KuaishouHotPhotoInfoServiceImpl extends ServiceImpl<KuaishouHotPhotoInfoMapper, KuaishouHotPhotoInfo> implements IKuaishouHotPhotoInfoService {
     @Autowired
     private KuaishouHotPhotoInfoMapper photoInfoMapper;

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/kuaishoucce/service/impl/KuaishouInspiredAdServiceImpl.java

@@ -5,6 +5,7 @@ import cn.com.ctop.crawler.modules.kuaishoucce.mapper.KuaishouInspiredAdMapper;
 import cn.com.ctop.crawler.modules.kuaishoucce.service.IKuaishouInspiredAdService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -17,6 +18,8 @@ import java.util.List;
  * @date 2020-03-03
  */
 @Service
+@Primary
+
 public class KuaishouInspiredAdServiceImpl extends ServiceImpl<KuaishouInspiredAdMapper, KuaishouInspiredAd> implements IKuaishouInspiredAdService {
     @Autowired
     private KuaishouInspiredAdMapper inspiredAdMapper;

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/log/service/impl/CrawlerLogServiceImpl.java

@@ -3,6 +3,7 @@ package cn.com.ctop.crawler.modules.log.service.impl;
 import cn.com.ctop.crawler.modules.log.entity.CrawlerLog;
 import cn.com.ctop.crawler.modules.log.mapper.CrawlerLogMapper;
 import cn.com.ctop.crawler.modules.log.service.ICrawlerLogService;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -14,6 +15,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  * @Version: V1.0
  */
 @Service
+@Primary
+
 public class CrawlerLogServiceImpl extends ServiceImpl<CrawlerLogMapper, CrawlerLog> implements ICrawlerLogService {
 
 }

+ 1 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/oceanengine/service/impl/DouyinHotServiceImpl.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/oceanengine/service/impl/EffectCaseServiceImpl.java

@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.net.HttpURLConnection;
@@ -26,6 +27,8 @@ import java.util.HashMap;
 import java.util.Map;
 
 @Service
+@Primary
+
 public class EffectCaseServiceImpl extends ServiceImpl<EffectCaseMapper, EffectCase> implements IEffectCaseService {
     @Autowired
     private IDouyinHotService douyinHotService;

+ 3 - 0
module-crawler/src/main/java/cn/com/ctop/crawler/modules/oceanengine/service/impl/HotMaterialServiceImpl.java

@@ -7,9 +7,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
+
 public class HotMaterialServiceImpl extends ServiceImpl<HotMaterialMapper, HotMaterial> implements IHotMaterialService {
     @Override
     public IPage<HotMaterial> queryHotFeeds(String userName, String start, String end, String orderByColumn, String orderByType, Integer pageNo, Integer pageSize) {

+ 3 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/app/service/impl/AppAdServiceImpl.java

@@ -6,11 +6,14 @@ import cn.com.ctop.kuaishou.modules.app.service.IAppAdService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
 
 @Service
+@Primary
+
 public class AppAdServiceImpl extends ServiceImpl<AppAdMapper, AppAd> implements IAppAdService {
     @Autowired
     private AppAdMapper appAdMapper;

+ 3 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/app/service/impl/AppVideoServiceImpl.java

@@ -4,8 +4,11 @@ import cn.com.ctop.kuaishou.modules.app.entity.AppVideo;
 import cn.com.ctop.kuaishou.modules.app.mapper.AppVideoMapper;
 import cn.com.ctop.kuaishou.modules.app.service.IAppVideoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 @Service
+@Primary
+
 public class AppVideoServiceImpl extends ServiceImpl<AppVideoMapper, AppVideo> implements IAppVideoService {
 }

+ 3 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/app/service/impl/KuaishouAppProductServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.kuaishou.modules.app.entity.KuaishouAppProduct;
 import cn.com.ctop.kuaishou.modules.app.mapper.KuaishouAppProductMapper;
 import cn.com.ctop.kuaishou.modules.app.service.IKuaishouAppProductService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -15,6 +16,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  * @version V1.0
  */
 @Service
+@Primary
+
 public class KuaishouAppProductServiceImpl extends ServiceImpl<KuaishouAppProductMapper, KuaishouAppProduct> implements IKuaishouAppProductService {
     @Autowired
     private KuaishouAppProductMapper kuaishouAppProductMapper;

+ 3 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/app/service/impl/KuaishouAppServiceImpl.java

@@ -20,6 +20,7 @@ import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.io.IOException;
@@ -31,6 +32,7 @@ import java.util.List;
  */
 @Slf4j
 @Service
+@Primary
 public class KuaishouAppServiceImpl implements IKuaishouAppService {
     @Autowired
     private IKuaishouCrawlerService kuaishouCrawlerService;
@@ -77,7 +79,7 @@ public class KuaishouAppServiceImpl implements IKuaishouAppService {
                             ad.setWidth(ad.getAdCover().getWidth());
                             ad.setHeight(ad.getAdCover().getHeight());
                             ad.setType(appFeeds.getType());
-                            ad.setAppName(ad.getAppName().replace(".apk","").replace(".APK","").replace("ios","").replace("IOS",""));
+                            ad.setAppName(ad.getAppName().replace(".apk", "").replace(".APK", "").replace("ios", "").replace("IOS", ""));
                             appAdService.saveOrUpdate(ad);
                             KuaishouAdAccount kuaishouAdAccount = kuaishouAdAccountService.getById(ad.getUserId());
                             if (kuaishouAdAccount == null) {

+ 2 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceAdvertisePlanServiceImpl.java

@@ -6,6 +6,7 @@ import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertisePlanServi
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -19,6 +20,7 @@ import java.util.List;
  */
 @Slf4j
 @Service
+@Primary
 public class ByteDanceAdvertisePlanServiceImpl extends ServiceImpl<ByteDanceAdvertisePlanMapper, ByteDanceAdvertisePlan> implements IByteDanceAdvertisePlanService {
     @Autowired
     private ByteDanceAdvertisePlanMapper byteDanceAdvertisePlanMapper;

+ 2 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceAdvertiserDataServiceImpl.java

@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -20,6 +21,7 @@ import java.util.*;
  */
 @Slf4j
 @Service
+@Primary
 public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserDataService {
     @Autowired
     private ICtopOauthTokenService tokenService;

+ 2 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceAdvertiserServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.toutiao.modules.material.entity.ByteDanceAdvertiser;
 import cn.com.ctop.toutiao.modules.material.mapper.ByteDanceAdvertiserMapper;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -13,6 +14,7 @@ import org.springframework.stereotype.Service;
  * @Version: V1.0
  */
 @Service
+@Primary
 public class ByteDanceAdvertiserServiceImpl extends ServiceImpl<ByteDanceAdvertiserMapper, ByteDanceAdvertiser> implements IByteDanceAdvertiserService {
 
 }

+ 2 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceCampaignServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.toutiao.modules.material.entity.ByteDanceCampaign;
 import cn.com.ctop.toutiao.modules.material.mapper.ByteDanceCampaignMapper;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceCampaignService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -13,6 +14,7 @@ import org.springframework.stereotype.Service;
  * @Version: V1.0
  */
 @Service
+@Primary
 public class ByteDanceCampaignServiceImpl extends ServiceImpl<ByteDanceCampaignMapper, ByteDanceCampaign> implements IByteDanceCampaignService {
 
 }

+ 2 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceCreativeMaterialServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.toutiao.modules.material.entity.ByteDanceCreativeMaterial;
 import cn.com.ctop.toutiao.modules.material.mapper.ByteDanceCreativeMaterialMapper;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceCreativeMaterialService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -13,6 +14,7 @@ import org.springframework.stereotype.Service;
  * @Version: V1.0
  */
 @Service
+@Primary
 public class ByteDanceCreativeMaterialServiceImpl extends ServiceImpl<ByteDanceCreativeMaterialMapper, ByteDanceCreativeMaterial> implements IByteDanceCreativeMaterialService {
 
 }

+ 2 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceCreativeServiceImpl.java

@@ -21,6 +21,7 @@ import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClientBuilder;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.io.BufferedReader;
@@ -39,6 +40,7 @@ import java.util.TreeMap;
  */
 @Slf4j
 @Service
+@Primary
 public class ByteDanceCreativeServiceImpl extends ServiceImpl<ByteDanceCreativeMapper, ByteDanceCreative> implements IByteDanceCreativeService {
     @Autowired
     private IFileInfoService fileInfoService;

+ 2 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceVideoInfoServiceImpl.java

@@ -5,6 +5,7 @@ import cn.com.ctop.toutiao.modules.material.mapper.ByteDanceVideoInfoMapper;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceVideoInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -16,6 +17,7 @@ import java.util.List;
  * @Version: V1.0
  */
 @Service
+@Primary
 public class ByteDanceVideoInfoServiceImpl extends ServiceImpl<ByteDanceVideoInfoMapper, ByteDanceVideoInfo> implements IByteDanceVideoInfoService {
     @Autowired
     private ByteDanceVideoInfoMapper videoInfoMapper;

+ 2 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/BytedanceCleanMaterialServiceImpl.java

@@ -6,11 +6,13 @@ import cn.com.ctop.toutiao.modules.report.entity.ByteDanceCleanMaterialReport;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceCreativeDailyReportMapper;
 import cn.com.ctop.toutiao.modules.report.service.IByteDanceCleanMaterialReportService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
 
 @Service
+@Primary
 public class BytedanceCleanMaterialServiceImpl implements IBytedanceCleanMaterialService {
     @Autowired
     private BytedanceCreativeDailyReportMapper bytedanceCreativeDailyReportMapper;

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ByteDanceCleanMaterialReportServiceImpl.java

@@ -7,6 +7,7 @@ import cn.com.ctop.toutiao.modules.report.mapper.BytedanceCreativeDailyReportMap
 import cn.com.ctop.toutiao.modules.report.service.IByteDanceCleanMaterialReportService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -19,6 +20,8 @@ import java.util.List;
  * @date 2020-02-25
  */
 @Service
+@Primary
+
 public class ByteDanceCleanMaterialReportServiceImpl extends ServiceImpl<ByteDanceCleanMaterialReportMapper, ByteDanceCleanMaterialReport> implements IByteDanceCleanMaterialReportService {
     @Autowired
     private BytedanceCreativeDailyReportMapper bytedanceCreativeDailyReportMapper;

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ByteDanceHourlyAccountWarningServiceImpl.java

@@ -12,6 +12,7 @@ import cn.com.ctop.toutiao.modules.report.service.IByteDanceHourlyAccountWarning
 import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -19,6 +20,8 @@ import java.math.RoundingMode;
 import java.util.List;
 
 @Service
+@Primary
+
 public class ByteDanceHourlyAccountWarningServiceImpl implements IByteDanceHourlyAccountWarningService {
 
     @Autowired

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceAdvertiserDailyReportServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.toutiao.modules.report.entity.BytedanceAdvertiserDailyReport;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceAdvertiserDailyReportMapper;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceAdvertiserDailyReportService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -13,6 +14,8 @@ import org.springframework.stereotype.Service;
  * @Version: V1.0
  */
 @Service
+@Primary
+
 public class BytedanceAdvertiserDailyReportServiceImpl extends ServiceImpl<BytedanceAdvertiserDailyReportMapper, BytedanceAdvertiserDailyReport> implements IBytedanceAdvertiserDailyReportService {
 
 }

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceAdvertiserHourlyReportServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.toutiao.modules.report.entity.BytedanceAdvertiserHourlyReport
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceAdvertiserHourlyReportMapper;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceAdvertiserHourlyReportService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -13,6 +14,8 @@ import org.springframework.stereotype.Service;
  * @Version: V1.0
  */
 @Service
+@Primary
+
 public class BytedanceAdvertiserHourlyReportServiceImpl extends ServiceImpl<BytedanceAdvertiserHourlyReportMapper, BytedanceAdvertiserHourlyReport> implements IBytedanceAdvertiserHourlyReportService {
 
 }

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceCampaignDailyReportServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.toutiao.modules.report.entity.BytedanceCampaignDailyReport;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceCampaignDailyReportMapper;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceCampaignDailyReportService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -13,6 +14,8 @@ import org.springframework.stereotype.Service;
  * @Version: V1.0
  */
 @Service
+@Primary
+
 public class BytedanceCampaignDailyReportServiceImpl extends ServiceImpl<BytedanceCampaignDailyReportMapper, BytedanceCampaignDailyReport> implements IBytedanceCampaignDailyReportService {
 
 }

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceCampaignHourlyReportServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.toutiao.modules.report.entity.BytedanceCampaignHourlyReport;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceCampaignHourlyReportMapper;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceCampaignHourlyReportService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -13,6 +14,8 @@ import org.springframework.stereotype.Service;
  * @Version: V1.0
  */
 @Service
+@Primary
+
 public class BytedanceCampaignHourlyReportServiceImpl extends ServiceImpl<BytedanceCampaignHourlyReportMapper, BytedanceCampaignHourlyReport> implements IBytedanceCampaignHourlyReportService {
 
 }

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceCreativeDailyReportServiceImpl.java

@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.HashMap;
@@ -22,6 +23,8 @@ import java.util.Map;
  * @Version: V1.0
  */
 @Service
+@Primary
+
 public class BytedanceCreativeDailyReportServiceImpl extends ServiceImpl<BytedanceCreativeDailyReportMapper, BytedanceCreativeDailyReport> implements IBytedanceCreativeDailyReportService {
     @Autowired
     private BytedanceCreativeDailyReportMapper bytedanceCreativeDailyReportMapper;

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceCreativeHourlyReportServiceImpl.java

@@ -6,6 +6,7 @@ import cn.com.ctop.toutiao.modules.report.mapper.BytedanceCreativeHourlyReportMa
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceCreativeHourlyReportService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -17,6 +18,8 @@ import java.util.List;
  * @Version: V1.0
  */
 @Service
+@Primary
+
 public class BytedanceCreativeHourlyReportServiceImpl extends ServiceImpl<BytedanceCreativeHourlyReportMapper, BytedanceCreativeHourlyReport> implements IBytedanceCreativeHourlyReportService {
     @Autowired
     private BytedanceCreativeHourlyReportMapper reportMapper;

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceDailyReportTaskServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.toutiao.modules.report.entity.BytedanceDailyReportTask;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceDailyReportTaskMapper;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceDailyReportTaskService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -13,6 +14,8 @@ import org.springframework.stereotype.Service;
  * @version V1.0
  */
 @Service
+@Primary
+
 public class BytedanceDailyReportTaskServiceImpl extends ServiceImpl<BytedanceDailyReportTaskMapper, BytedanceDailyReportTask> implements IBytedanceDailyReportTaskService {
 
 }

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceFundDailyServiceImpl.java

@@ -11,6 +11,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import lombok.var;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -22,6 +23,8 @@ import org.springframework.stereotype.Service;
  */
 @Slf4j
 @Service
+@Primary
+
 public class BytedanceFundDailyServiceImpl extends ServiceImpl<BytedanceFundDailyMapper, BytedanceFundDaily> implements IBytedanceFundDailyService {
     @Override
     public void loadFundDataByPage(CtopOauthToken token, String startDate, String endDate, Integer pageNum) {

+ 204 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceHomepageReportServiceImpl.java

@@ -0,0 +1,204 @@
+package cn.com.ctop.toutiao.modules.report.service.impl;
+
+import cn.com.ctop.toutiao.modules.report.mapper.BytedanceHomepageMapper;
+import cn.com.ctop.toutiao.modules.report.service.IBytedanceHomepageReportService;
+import com.alibaba.fastjson.JSONObject;
+import org.jeecg.common.constant.SystemDateConstant;
+import org.jeecg.common.util.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by JQ.bi on 2020.05.19
+ */
+@Service
+public class BytedanceHomepageReportServiceImpl implements IBytedanceHomepageReportService {
+
+    @Autowired
+    BytedanceHomepageMapper bytedanceHomepageMapper;
+
+    @Override
+    public Map<String, JSONObject> getWeekReport(JSONObject requestBody) {
+        Map<String, JSONObject> result = new HashMap<>();
+        //当天日期
+        String nowDate = DateUtils.getNowDate(SystemDateConstant.yyyy_MM_dd);
+        //本周汇总数据
+        JSONObject weekSumData = bytedanceHomepageMapper.querySumByStartEndDate(nowDate,
+                DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, nowDate, -7));
+        //上周汇总数据
+        JSONObject weekBeforeSumData = bytedanceHomepageMapper.querySumByStartEndDate(DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, nowDate, -7),
+                DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, nowDate, -14));
+        //一周内每日数据汇总
+        List<JSONObject> weekDetailData = bytedanceHomepageMapper.queryDetailByStartEndDate(nowDate,
+                DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, nowDate, -7));
+        //一周内cost top数据
+        List<JSONObject> costTop = bytedanceHomepageMapper.queryTopCost(nowDate, DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, nowDate, -7), 7);
+        JSONObject top = new JSONObject();
+        top.put("top7", costTop);
+        //周明细环比数据拼接
+        JSONObject costWeekData = new JSONObject();
+        JSONObject clickWeekData = new JSONObject();
+        JSONObject showNumWeekData = new JSONObject();
+        weekDetailData.forEach(day -> {
+            costWeekData.put((String) day.get("statDate"), day.get("cost"));
+            clickWeekData.put((String) day.get("statDate"), day.get("click"));
+            showNumWeekData.put((String) day.get("statDate"), day.get("showNum"));
+        });
+        costWeekData.put("weekCostSum", weekSumData.get("cost"));
+        costWeekData.put("weekCostSumLink", countLink(weekSumData.getBigDecimal("cost"), weekBeforeSumData.getBigDecimal("cost")));
+        clickWeekData.put("weekClickSum", weekSumData.get("click"));
+        clickWeekData.put("weekClickSumLink", countLink(BigDecimal.valueOf(weekSumData.getLongValue("click")), BigDecimal.valueOf(weekBeforeSumData.getLong("click"))));
+        showNumWeekData.put("weekCostSum", weekSumData.get("showNum"));
+        showNumWeekData.put("weekShowNumSumLink", countLink(BigDecimal.valueOf(weekSumData.getLongValue("showNum")), BigDecimal.valueOf(weekBeforeSumData.getLong("showNum"))));
+
+        result.put("costWeek", costWeekData);
+        result.put("clickWeek", clickWeekData);
+        result.put("showNumWeek", showNumWeekData);
+        result.put("top", top);
+
+        return result;
+    }
+
+    /**
+     * timeType :1,2,3,4,5,6,7,8,9  前端约束入参类型
+     */
+    @Override
+    public List<JSONObject> getChartByDate(JSONObject requestBody) {
+        int timeType = requestBody.getInteger("type");
+        List<JSONObject> resultBody = new ArrayList<>();
+        if (requestBody.isEmpty()) {
+            return resultBody;
+        }
+        //当天日期
+        String nowDate = DateUtils.getNowDate(SystemDateConstant.yyyy_MM_dd);
+        //startTime 为取什么时间段数据的开始时间,默认昨天
+        String anotherDay = DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, nowDate, -1);
+        switch (timeType) {
+            //今天
+            case 1:
+                resultBody = getCompareGroupByHour(nowDate, anotherDay);
+                break;
+            //昨天
+            case 2:
+                resultBody = bytedanceHomepageMapper.queryTodayDetailReportBy(anotherDay);
+                break;
+            //近一周
+            case 3:
+                resultBody = bytedanceHomepageMapper.queryDetailByStartEndDate(nowDate,
+                        DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, anotherDay, -6));
+                break;
+            //近半个月(15天)
+            case 4:
+                resultBody = bytedanceHomepageMapper.queryDetailByStartEndDate(nowDate,
+                        DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, anotherDay, -14));
+                break;
+            //近一个月
+            case 5:
+                resultBody = bytedanceHomepageMapper.queryDetailByStartEndDate(nowDate,
+                        DateUtils.getMonthBefore(SystemDateConstant.yyyy_MM_dd, anotherDay, -1));
+                break;
+            //近三个月
+            case 6:
+                resultBody = bytedanceHomepageMapper.queryDetailByStartEndDate(nowDate,
+                        DateUtils.getMonthBefore(SystemDateConstant.yyyy_MM_dd, anotherDay, -3));
+                break;
+            //近半年
+            case 7:
+                resultBody = bytedanceHomepageMapper.queryDetailByStartEndDate(nowDate,
+                        DateUtils.getMonthBefore(SystemDateConstant.yyyy_MM_dd, anotherDay, -6));
+                break;
+            //全部数据
+            case 8:
+                resultBody = bytedanceHomepageMapper.queryDetailGroupMonthByDate(SystemDateConstant.BEGIN_TIME, nowDate);
+                break;
+            //自定义起始时间
+            case 9:
+                resultBody = bytedanceHomepageMapper.queryDetailByStartEndDate(requestBody.getString("startDate"), requestBody.getString("endDate"));
+                break;
+            //对比
+            case 10:
+                resultBody = getChartByType_10(requestBody.getString("sign"), requestBody.getString("smallDate"), requestBody.getString("bigDate"));
+                break;
+            default:
+        }
+        return resultBody;
+    }
+
+    @Override
+    public JSONObject getTopCostByDate(JSONObject requestBody) {
+        return null;
+    }
+
+    //自定义日期对比(日对比,月对比)
+    private List<JSONObject> getChartByType_10(String sign, String smallDate, String bigDate) {
+        List<JSONObject> result = new ArrayList<>();
+        if (!sign.isEmpty() && sign.equals("month")) {
+            result = this.getCompareGroupByDay(smallDate, bigDate);
+        } else if (!sign.isEmpty() && sign.equals("day")) {
+            result = this.getCompareGroupByHour(bigDate, smallDate);
+        }
+        return result;
+    }
+
+    //两个月份的数据对比
+    private List<JSONObject> getCompareGroupByDay(String smallDate, String bigDate) {
+        //大月份数据
+        List<JSONObject> afterDetail = bytedanceHomepageMapper.queryDetailGroupDayByMonth(bigDate);
+        //小月份数据
+        List<JSONObject> beforeDetail = bytedanceHomepageMapper.queryDetailGroupDayByMonth(smallDate);
+        List<JSONObject> beforeData;List<JSONObject> afterData;
+        if (afterDetail.size() >= beforeDetail.size()) {
+            beforeData = afterDetail;
+            afterData = beforeData;
+        } else {
+            beforeData = beforeDetail;
+            afterData = afterDetail;
+        }
+        return this.getCompareDate(beforeData,afterData,"day");
+    }
+
+    //今天昨天数据对比
+    private List<JSONObject> getCompareGroupByHour(String nowDate, String anotherDay) {
+        List<JSONObject> afterDetail = bytedanceHomepageMapper.queryTodayDetailReportBy(nowDate);
+        List<JSONObject> beforeDetail = bytedanceHomepageMapper.queryTodayDetailReportBy(anotherDay);
+        return this.getCompareDate(beforeDetail, afterDetail, "statHour");
+    }
+
+    //数据对比,环比计算
+    private List<JSONObject> getCompareDate(List<JSONObject> beforeData, List<JSONObject> AfterData, String standard) {
+        List<JSONObject> result = new ArrayList<>();
+        beforeData.forEach(before -> {
+            String yesStatHour = String.valueOf(before.get(standard));
+            AfterData.forEach(after -> {
+                if ((String.valueOf(after.get(standard))).equals(yesStatHour)) {
+                    //消耗较昨日环比
+                    after.put("costProportion", countLink(after.getBigDecimal("cost"), before.getBigDecimal("cost")));
+                    //展示量较昨日环比
+                    after.put("showProportion", countLink(BigDecimal.valueOf(after.getLong("showNum")), BigDecimal.valueOf(before.getLong("showNum"))));
+                    //点击量较昨日环比
+                    after.put("photoClickProportion", countLink(BigDecimal.valueOf(after.getLong("click")), BigDecimal.valueOf(before.getLong("click"))));
+                    before.put("afterData", after);
+                }
+            });
+            result.add(before);
+        });
+        return result;
+    }
+
+    //环比计算
+    private BigDecimal countLink(BigDecimal numA, BigDecimal numB) {
+        BigDecimal link = new BigDecimal(0);
+        if (!BigDecimal.ZERO.equals(numB)) {
+            link = (numA.subtract(numB)).divide(numB, 4, RoundingMode.HALF_UP);
+        }
+        return link;
+    }
+
+}

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedancePlanDailyReportServiceImpl.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
@@ -20,6 +21,8 @@ import java.util.List;
  * @Version: V1.0
  */
 @Service
+@Primary
+
 public class BytedancePlanDailyReportServiceImpl extends ServiceImpl<BytedancePlanDailyReportMapper, BytedancePlanDailyReport> implements IBytedancePlanDailyReportService {
     @Autowired
     private BytedancePlanDailyReportMapper dailyReportMapper;

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedancePlanHourlyReportServiceImpl.java

@@ -5,6 +5,7 @@ import cn.com.ctop.toutiao.modules.report.mapper.BytedancePlanHourlyReportMapper
 import cn.com.ctop.toutiao.modules.report.service.IBytedancePlanHourlyReportService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -16,6 +17,8 @@ import java.util.List;
  * @Version: V1.0
  */
 @Service
+@Primary
+
 public class BytedancePlanHourlyReportServiceImpl extends ServiceImpl<BytedancePlanHourlyReportMapper, BytedancePlanHourlyReport> implements IBytedancePlanHourlyReportService {
     @Autowired
     private BytedancePlanHourlyReportMapper reportMapper;

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportMaterialDailyServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.toutiao.modules.report.entity.BytedanceReportMaterialDaily;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceReportMaterialDailyMapper;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportMaterialDailyService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -13,6 +14,8 @@ import org.springframework.stereotype.Service;
  * @version V1.0
  */
 @Service
+@Primary
+
 public class BytedanceReportMaterialDailyServiceImpl extends ServiceImpl<BytedanceReportMaterialDailyMapper, BytedanceReportMaterialDaily> implements IBytedanceReportMaterialDailyService {
 
 }

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportMaterialRetryServiceImpl.java

@@ -4,6 +4,7 @@ import cn.com.ctop.toutiao.modules.report.entity.BytedanceReportMaterialRetry;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceReportMaterialRetryMapper;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportMaterialRetryService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 /**
@@ -13,6 +14,8 @@ import org.springframework.stereotype.Service;
  * @version V1.0
  */
 @Service
+@Primary
+
 public class BytedanceReportMaterialRetryServiceImpl extends ServiceImpl<BytedanceReportMaterialRetryMapper, BytedanceReportMaterialRetry> implements IBytedanceReportMaterialRetryService {
 
 }

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportServiceImpl.java

@@ -23,6 +23,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -34,6 +35,8 @@ import java.util.Map;
 
 @Service
 @Slf4j
+@Primary
+
 public class BytedanceReportServiceImpl implements IBytedanceReportService {
 
     @Value("${jeecg.path.report-history}")

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ReportServiceImpl.java

@@ -20,6 +20,7 @@ import lombok.var;
 import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
@@ -32,6 +33,8 @@ import java.util.Map;
  */
 @Slf4j
 @Service
+@Primary
+
 public class ReportServiceImpl implements IReportService {
     @Value("${jeecg.path.csv-upload}")
     private String csvUploadPath;

+ 0 - 37
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/ByteDanceCleanMaterialJob.java

@@ -1,37 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-import cn.com.ctop.common.module.utils.Check;
-import cn.com.ctop.toutiao.modules.report.service.IByteDanceCleanMaterialReportService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * 清洗素材报表
- *
- * @author 宋英豪
- */
-@Component
-public class ByteDanceCleanMaterialJob {
-    @Autowired
-    private IByteDanceCleanMaterialReportService cleanMaterialService;
-    static ExecutorService executorService = null;
-
-    @XxlJob("byteDanceCleanMaterial")
-    public ReturnT<String> execute(String param) throws Exception {
-        List<String> signatureList = cleanMaterialService.getSignature();
-        if (Check.isNull(signatureList)) {
-            XxlJobLogger.log("头条素材数据获取为空");
-            return ReturnT.FAIL;
-        }
-        executorService = Executors.newFixedThreadPool(3);
-        signatureList.forEach(signature -> executorService.submit(() -> cleanMaterialService.calculationMaterialReport(signature)));
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 47
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/ByteDanceHourlyAccountWarningLoadJob.java

@@ -1,47 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.modules.report.service.IByteDanceHourlyAccountWarningService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * 头条预警
- *
- * @author yumeng
- */
-@Component
-public class ByteDanceHourlyAccountWarningLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IByteDanceHourlyAccountWarningService byteDanceHourlyAccountWarningService;
-    static ExecutorService executorService = null;
-
-    @XxlJob("byteDanceHourlyAccountWarning")
-    public ReturnT<String> execute(String param) throws Exception {
-        XxlJobLogger.log("开始时段消耗预警定时任务");
-        long startTime = System.currentTimeMillis();
-        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-        if (null == tokens || tokens.size() <= 0) {
-            XxlJobLogger.log("定时获取头条数据异常:未获取到可用的token");
-            return ReturnT.FAIL;
-        }
-        executorService = Executors.newFixedThreadPool(3);
-        String statDate = DateUtils.getDate("yyyy-MM-dd");
-        String anotherDay = DateUtils.getAnotherDay("yyyy-MM-dd", statDate, 1);
-        tokens.forEach(token -> executorService.submit(() -> byteDanceHourlyAccountWarningService.byteDanceAccountWarning(token.getAccountId(), statDate, anotherDay)));
-        XxlJobLogger.log("时段消耗预警定时任务执行完毕,耗时:{} ms", System.currentTimeMillis() - startTime);
-        return ReturnT.SUCCESS;
-    }
-}

+ 3 - 0
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceAdvertiserDailyReportLoadJob.java

@@ -9,6 +9,7 @@ import com.xxl.job.core.handler.annotation.XxlJob;
 import com.xxl.job.core.log.XxlJobLogger;
 import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Component;
 
 import java.util.Date;
@@ -25,8 +26,10 @@ import java.util.concurrent.Executors;
 @Component
 public class BytedanceAdvertiserDailyReportLoadJob {
     @Autowired
+    @Qualifier("tokenService")
     private ICtopOauthTokenService tokenService;
     @Autowired
+    @Qualifier("reportService")
     private IReportService reportService;
     static ExecutorService executorService = null;
 

+ 0 - 58
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceAdvertiserHourlyReportLoadJob.java

@@ -1,58 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.modules.report.service.IReportService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * @author 宋英豪
- * 头条广告主时报获取任务
- */
-@Component
-public class BytedanceAdvertiserHourlyReportLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IReportService reportService;
-    static ExecutorService executorService = null;
-
-    @XxlJob("bytedanceAdvertiserHourlyReport")
-    public ReturnT<String> execute(String param) throws Exception {
-        XxlJobLogger.log("头条时报数据获取开始");
-        Date getDate = new Date();
-        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
-        String hour = simpleDateFormat.format(getDate);
-        //1:查询当日数据
-        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-        if (null == tokens || tokens.size() <= 0) {
-            XxlJobLogger.log("定时获取头条小时数据异常:未获取到可用的token");
-            return ReturnT.FAIL;
-        }
-        executorService = Executors.newFixedThreadPool(4);
-        tokens.forEach(token -> {
-            executorService.submit(() -> {
-                if (null != hour && "00".equals(hour)) {
-                    Date finalGetDate = DateUtils.addDay(getDate, -1);
-                    //获取广告主信息数据
-                    reportService.getAdvertiserReport(token, finalGetDate, finalGetDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
-                }
-                reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
-            });
-        });
-        XxlJobLogger.log("头条时报数据获取结束");
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 59
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceAdvertisingDataLoadJob.java

@@ -1,59 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
-import cn.com.ctop.toutiao.modules.material.service.IByteDanceCreativeService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * 头条广告物料数据获取任务
- * @author 宋英豪
- */
-@Component
-public class BytedanceAdvertisingDataLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    static ExecutorService executorService = null;
-    @Autowired
-    private IByteDanceAdvertiserDataService advertiserDataService;
-    @Autowired
-    private IByteDanceCreativeService creativeService;
-
-    @XxlJob("bytedanceAdvertisingData")
-    public ReturnT<String> execute(String params) throws Exception {
-        Date getDate = new Date();
-        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
-        String dateString = dateFormat.format(getDate);
-        //1:查询当日数据
-        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-        executorService = Executors.newFixedThreadPool(5);
-        tokens.forEach(token -> {
-            executorService.submit(() -> {
-                try {
-                    //1:获取当日广告组数据
-                    advertiserDataService.getAdvertiserCampaign(token.getAccountId() + "", "", dateString);
-                    //2:获取当日广告计划数据
-                    advertiserDataService.getAdvertiserPlan(token, "", dateString, null);
-                    //3:获取当日创意数据
-                    creativeService.getAdvertiserCreative(token.getAccountId() + "", "", dateString);
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            });
-        });
-        XxlJobLogger.log("物料数据同步完成");
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 48
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceCreativeDailyReportLoadJob.java

@@ -1,48 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.modules.report.service.IReportService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * @author syh
- * 头条创意日报数据获取任务
- * 第二天凌晨跑前一天的数据
- */
-@Component
-public class BytedanceCreativeDailyReportLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IReportService reportService;
-    static ExecutorService executorService = null;
-
-
-    @XxlJob("bytedanceCreativeDailyReport")
-    public ReturnT<String> execute(String param) throws Exception {
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        //1:查询当日数据
-        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-        if (null == tokens || tokens.size() <= 0) {
-            XxlJobLogger.log("定时获取头条数据异常:为获取到可用的token");
-            return ReturnT.FAIL;
-        }
-        executorService = Executors.newFixedThreadPool(5);
-        tokens.forEach(token -> executorService.submit(() -> reportService.getAdvertiserCreativeReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY)));
-        return ReturnT.SUCCESS;
-    }
-
-
-}

+ 0 - 59
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceCreativeHourlyReportLoadJob.java

@@ -1,59 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.modules.report.service.IReportService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * @author syh
- * 头条创意时报获取任务
- */
-@Component
-public class BytedanceCreativeHourlyReportLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IReportService reportService;
-    static ExecutorService executorService = null;
-
-    @XxlJob("bytedanceCreativeHourlyReport")
-    public ReturnT<String> execute(String param) throws Exception {
-        XxlJobLogger.log("头条时报数据获取开始");
-        Date getDate = new Date();
-        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
-        String hour = simpleDateFormat.format(getDate);
-        //1:查询当日数据
-        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-        if (null == tokens || tokens.size() <= 0) {
-            XxlJobLogger.log("定时获取头条小时数据异常:未获取到可用的token");
-            return ReturnT.FAIL;
-        }
-        executorService = Executors.newFixedThreadPool(4);
-        tokens.forEach(token -> {
-            executorService.submit(() -> {
-                if (null != hour && "00".equals(hour)) {
-                    Date finalGetDate = DateUtils.addDay(getDate, -1);
-                    //获取广告创意信息数据
-                    reportService.getAdvertiserCreativeReport(token, finalGetDate, finalGetDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
-                }
-                reportService.getAdvertiserCreativeReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
-            });
-
-        });
-        XxlJobLogger.log("头条时报数据获取结束");
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 105
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedancePlanDailyReportLoadJob.java

@@ -1,105 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-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.IUserAllocationService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.modules.report.entity.BytedancePlanDailyReport;
-import cn.com.ctop.toutiao.modules.report.service.IBytedancePlanDailyReportService;
-import cn.com.ctop.toutiao.modules.report.service.IReportService;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-
-/**
- * 头条计划日报数据任务
- */
-@Component
-public class BytedancePlanDailyReportLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IReportService reportService;
-    @Autowired
-    private IUserAllocationService userAllocationService;
-
-    @XxlJob("bytedancePlanDailyReport")
-    public ReturnT<String> execute(String param) throws Exception {
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        //1:查询当日数据
-        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-        if (null == tokens || tokens.size() <= 0) {
-            XxlJobLogger.log("定时获取头条数据异常:为获取到可用的token");
-            return ReturnT.FAIL;
-        }
-        tokens.forEach(token -> reportService.getAdvertiserPlanReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY));
-        formatZybData(215, getDate);
-        planDailyReportService.cleanChannelCodeData(112, getDate);
-        planDailyReportService.cleanChannelCodeData(113, getDate);
-        planDailyReportService.cleanChannelCodeData(222, getDate);
-        planDailyReportService.cleanYzData(151);
-        planDailyReportService.cleanChannelCodeData(235, getDate);
-        planDailyReportService.cleanChannelCodeData(270, getDate);
-        return ReturnT.SUCCESS;
-    }
-
-    private void formatZybData(Integer projectId, Date getDate) {
-        //清洗关于作业帮数据
-        //1:查询作业帮相关的用户数据
-        QueryWrapper<UserAllocation> wrapper = new QueryWrapper<>();
-        wrapper.eq("project_id", projectId);
-        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);
-                    });
-                }
-            });
-        }
-    }
-
-    @Autowired
-    private IBytedancePlanDailyReportService planDailyReportService;
-}

+ 0 - 79
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedancePlanHourlyReportLoadJob.java

@@ -1,79 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.modules.report.service.IBytedancePlanDailyReportService;
-import cn.com.ctop.toutiao.modules.report.service.IReportService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * @author 宋英豪
- * 头条计划时报数据任务
- */
-@Component
-public class BytedancePlanHourlyReportLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IReportService reportService;
-    @Autowired
-    private IBytedancePlanDailyReportService planDailyReportService;
-    static ExecutorService executorService = null;
-    //线程计数器
-    static CountDownLatch countDownLatch = null;
-
-
-    @XxlJob("bytedancePlanHourlyReport")
-    public ReturnT<String> execute(String param) {
-        XxlJobLogger.log("头条时报数据获取开始");
-        Date getDate = new Date();
-        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
-        String hour = simpleDateFormat.format(getDate);
-        //1:查询当日计划时报数据
-        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-        executorService = Executors.newFixedThreadPool(5);
-        countDownLatch = new CountDownLatch(tokens.size());
-        tokens.forEach(token -> executorService.submit(() -> {
-                try {
-                    if (null != hour && "00".equals(hour)) {
-                        Date finalGetDate = DateUtils.addDay(getDate, -1);
-                        reportService.getAdvertiserPlanReport(token, finalGetDate, finalGetDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
-                    }
-                    reportService.getAdvertiserPlanReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
-                } catch (Exception e) {
-                    XxlJobLogger.log(e.getMessage());
-                } finally {
-                    countDownLatch.countDown();
-                }
-        }));
-
-        try {
-            countDownLatch.await();
-        } catch (InterruptedException e) {
-            XxlJobLogger.log(e.getMessage());
-        }
-        //清洗缘多多数据渠道号
-        if (null != hour && "00".equals(hour)) {
-            Date lastday = DateUtils.addDay(getDate, -1);
-            planDailyReportService.cleanYddHourlyChannelCode(113, lastday);
-        }
-        planDailyReportService.cleanYddHourlyChannelCode(113, getDate);
-
-        XxlJobLogger.log("头条时报数据获取结束");
-        executorService.shutdown();
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 34
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedancePlanLoadJob.java

@@ -1,34 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-@Component
-public class BytedancePlanLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    static ExecutorService executorService = null;
-    @Autowired
-    private IByteDanceAdvertiserDataService advertiserDataService;
-
-    @XxlJob("bytedancePlanLoadJob")
-    public ReturnT<String> execute(String param) throws Exception {
-        //1:查询当日数据
-        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-        executorService = Executors.newFixedThreadPool(4);
-        tokens.forEach(token -> executorService.submit(() -> advertiserDataService.getAdvertiserPlan(token, "", null, null)));
-        XxlJobLogger.log("头条全量计划数据获取完成");
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 42
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedancePlanRealTimeLoadJob.java

@@ -1,42 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * 头条当日计划素材获取任务
- */
-
-@Component
-public class BytedancePlanRealTimeLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    private ExecutorService executorService = null;
-    @Autowired
-    private IByteDanceAdvertiserDataService advertiserDataService;
-
-    @XxlJob("bytedanceRealTimePlanInfo")
-    public ReturnT<String> execute(String param) throws Exception {
-        //1:查询当日数据
-        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-        executorService = Executors.newFixedThreadPool(4);
-        String nowDate = DateUtils.date2Str();
-        tokens.forEach(token -> executorService.submit(() -> advertiserDataService.getAdvertiserPlan(token, "", nowDate, nowDate)));
-        XxlJobLogger.log("头条全量计划数据获取完成");
-        return ReturnT.SUCCESS;
-    }
-
-
-}

+ 0 - 34
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceSameDayCreativeLoadJob.java

@@ -1,34 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-@Component
-public class BytedanceSameDayCreativeLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    static ExecutorService executorService = null;
-    @Autowired
-    private IByteDanceAdvertiserDataService advertiserDataService;
-
-    @XxlJob("bytedanceSameDayCreative")
-    public ReturnT<String> execute(String param) throws Exception {
-        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-        String getDateStr = DateUtils.formatDate(new Date());
-        executorService = Executors.newFixedThreadPool(6);
-        tokens.forEach(token -> executorService.submit(() -> advertiserDataService.getAdvertiserCreative(token, getDateStr)));
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 31
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/bytedance/BytedanceVideoInfoLoadJob.java

@@ -1,31 +0,0 @@
-package com.xxl.job.executor.handler.bytedance;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-@Component
-public class BytedanceVideoInfoLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    static ExecutorService executorService = null;
-    @Autowired
-    private IByteDanceAdvertiserDataService advertiserDataService;
-
-    @XxlJob("bytedanceVideoInfo")
-    public ReturnT<String> execute(String param) throws Exception {
-        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-        executorService = Executors.newFixedThreadPool(4);
-        tokens.forEach(token -> executorService.submit(() -> advertiserDataService.getMaterialList(token)));
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 33
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouCampaignJob.java

@@ -1,33 +0,0 @@
-package com.xxl.job.executor.handler.kuaishou;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-@Component
-public class KuaishouCampaignJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-
-    static ExecutorService executorService = null;
-
-    @XxlJob("kuaishouCampaignJob")
-    public ReturnT<String> execute(String param) {
-        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-        executorService = Executors.newFixedThreadPool(5);
-        tokens.forEach(token -> executorService.submit(() -> kuaishouInterfaceService.getCampaignList(token, null, null)));
-        XxlJobLogger.log("快手物料数据同步完成");
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 45
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyAccountReportLoadJob.java

@@ -1,45 +0,0 @@
-package com.xxl.job.executor.handler.kuaishou;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * 快手广告主分天数据
- *
- * @author syh
- */
-@Component
-public class KuaishouDailyAccountReportLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-    static ExecutorService executorService = null;
-
-    @XxlJob("kuaishouDailyAccountReport")
-    public ReturnT<String> execute(String param) throws Exception {
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        //1:查询当日数据
-        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-        if (null == tokens || tokens.size() <= 0) {
-            XxlJobLogger.log("定时获取快手数据异常:未获取到可用的token");
-            return ReturnT.FAIL;
-        }
-
-        executorService = Executors.newFixedThreadPool(3);
-        tokens.forEach(token -> executorService.submit(() -> kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate, getDate)));
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 44
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyCampaignReportLoadJob.java

@@ -1,44 +0,0 @@
-package com.xxl.job.executor.handler.kuaishou;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * 广告计划分天报表
- *
- * @author syh
- */
-@Component
-public class KuaishouDailyCampaignReportLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-    static ExecutorService executorService = null;
-
-    @XxlJob("kuaishouDailyCampaignReport")
-    public ReturnT<String> execute(String param) throws Exception {
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        //1:查询当日数据
-        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-        if (null == tokens || tokens.size() <= 0) {
-            XxlJobLogger.log("定时获取快手数据异常:未获取到可用的token");
-            return ReturnT.FAIL;
-        }
-        executorService = Executors.newFixedThreadPool(3);
-        tokens.forEach(token -> executorService.submit(() -> kuaishouInterfaceService.getAdvertiserCampaignReportDaily(token, getDate, getDate)));
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 63
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyCreativeReportLoadJob.java

@@ -1,63 +0,0 @@
-package com.xxl.job.executor.handler.kuaishou;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.utils.Check;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouCampaignService;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
-import com.alibaba.fastjson.JSONArray;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * 获取创意分天报表
- *
- * @author jeecg-boot
- */
-@Component
-public class KuaishouDailyCreativeReportLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-
-    static ExecutorService executorService = null;
-
-    @Autowired
-    private IKuaiShouCampaignService campaignService;
-
-    @XxlJob("kuaishouDailyCreativeReport")
-    public ReturnT<String> execute(String param) throws Exception {
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        executorService = Executors.newFixedThreadPool(4);
-        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-        if (null == tokens || tokens.size() <= 0) {
-            XxlJobLogger.log("定时获取快手数据异常:未获取到可用的token");
-            return ReturnT.FAIL;
-        }
-        tokens.forEach(token -> {
-            XxlJobLogger.log("获取创意分天报表开始,accountId:{}", token.getAccountId());
-            kuaishouInterfaceService.getCampaignList(token, null, null);
-            try {
-                Thread.sleep(5 * 100);
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-            }
-            List<JSONArray> campaigns = campaignService.getJsonArrByAccount(token.getAccountId(), 50);
-            if (!Check.isNull(campaigns) && campaigns.size() > 0) {
-                campaigns.forEach(campaign -> executorService.submit(() -> kuaishouInterfaceService.getAdvertiserCreativeReportDaily(token, getDate, getDate, campaign)));
-            }
-        });
-        return ReturnT.SUCCESS;
-    }
-
-}

+ 0 - 44
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyGroupReportLoadJob.java

@@ -1,44 +0,0 @@
-package com.xxl.job.executor.handler.kuaishou;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * 获取广告组分天报表
- *
- * @author syh
- */
-@Component
-public class KuaishouDailyGroupReportLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-    static ExecutorService executorService = null;
-
-    @XxlJob("kuaishouDailyGroupReport")
-    public ReturnT<String> execute(String param) throws Exception {
-        Date getDate = DateUtils.addDay(new Date(), -1);
-        //1:查询当日数据
-        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-        if (null == tokens || tokens.size() <= 0) {
-            XxlJobLogger.log("定时获取快手数据异常:未获取到可用的token");
-            return ReturnT.FAIL;
-        }
-        executorService = Executors.newFixedThreadPool(3);
-        tokens.forEach(token -> executorService.submit(() -> kuaishouInterfaceService.getAdvertiserGroupReportDaily(token, getDate, getDate)));
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 46
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyLoadFileJob.java

@@ -1,46 +0,0 @@
-package com.xxl.job.executor.handler.kuaishou;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyReportTaskService;
-import com.xxl.job.core.biz.model.ReturnT;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import com.xxl.job.core.log.XxlJobLogger;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import static org.jeecg.common.util.DateUtils.getAnotherDay;
-
-/**
- * 获取文件状态并下载入库
- *
- * @author yumeng
- */
-@Component
-public class KuaishouDailyLoadFileJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    private ExecutorService executorService = null;
-    @Autowired
-    private IKuaiShouDailyReportTaskService dailyReportTaskService;
-
-    @XxlJob("kuaishouDailyLoadFile")
-    public ReturnT<String> execute(String param) throws Exception {
-        String nowDate = DateUtils.getDate("yyyy-MM-dd");
-        String statDate = getAnotherDay("yyyy-MM-dd", nowDate, -1);
-        //  查询快手token
-        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-        if (null == tokens || tokens.size() <= 0) {
-            XxlJobLogger.log("定时获取快手数据异常:未获取到可用的token");
-            return ReturnT.FAIL;
-        }
-        executorService = Executors.newFixedThreadPool(3);
-        tokens.forEach(token -> executorService.submit(() -> dailyReportTaskService.getTaskList(token.getAccountId(), token.getAccessToken(), statDate)));
-        return ReturnT.SUCCESS;
-    }
-}

+ 0 - 0
xxl-job-executor/src/main/java/com/xxl/job/executor/handler/kuaishou/KuaishouDailyReportTaskJob.java


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů