Sfoglia il codice sorgente

添加任务调度类

syh 4 anni fa
parent
commit
36288c60c8

+ 13 - 13
jeecg-boot-module-system/src/main/resources/application-wps.yml

@@ -56,13 +56,13 @@ spring:
   autoconfigure:
     exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
   datasource:
-#    url: jdbc:mysql://139.186.27.96:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-#    username: hcst
-#    password: test@20190531
-    url: jdbc:mysql://139.186.31.213:3316/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-    username: root
-    password: hcst@2020
-    driver-class-name: com.mysql.jdbc.Driver
+    url: jdbc:mysql://139.186.27.96:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+    username: hcst
+    password: test@20190531
+#    url: jdbc:mysql://139.186.31.213:3316/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+#    username: root
+#    password: hcst@2020
+#    driver-class-name: com.mysql.jdbc.Driver
     druid:
       stat-view-servlet:
         loginUsername: admin
@@ -99,12 +99,12 @@ spring:
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
       datasource:
         master:
-#          url: jdbc:mysql://139.186.27.96:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-#          username: hcst
-#          password: test@20190531
-          url: jdbc:mysql://139.186.31.213:3316/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-          username: root
-          password: hcst@2020
+          url: jdbc:mysql://139.186.27.96:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+          username: hcst
+          password: test@20190531
+#          url: jdbc:mysql://139.186.31.213:3316/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+#          username: root
+#          password: hcst@2020
           driver-class-name: com.mysql.jdbc.Driver
   #redis 配置
   redis:

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

@@ -3,8 +3,10 @@ package org.jeecg;
 import cn.com.ctop.common.module.entity.BindAccountLogin;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.entity.UserAllocation;
-import cn.com.ctop.common.module.message.handle.impl.EmailSendMsgHandle;
-import cn.com.ctop.common.module.service.*;
+import cn.com.ctop.common.module.service.IBindAccountLoginService;
+import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.common.module.service.ISendMessageService;
+import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyReportTaskService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
@@ -15,13 +17,11 @@ import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouAgentAccountMapper;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceFundDailyService;
-import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
 import cn.com.ctop.toutiao.modules.report.service.IReportService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.xxl.job.core.log.XxlJobLogger;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.junit.Test;
@@ -300,53 +300,4 @@ public class SampleTest {
             }
 //        }
     }
-
-    @Autowired
-    IUReportExportService uReportExportService;
-    @Autowired
-    EmailSendMsgHandle emailSendMsgHandle;
-    @Autowired
-    IUReportService uReportService;
-
-    @Test
-    public void loadBytedanceData(){
-        List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
-        for (int i=0;i<tokens.size();i++) {
-            for(int j=0;j<4;j++){
-                String getDate = DateUtils.formatDate(DateUtils.addDay(new Date(), -j));
-                bytedanceReportService.bytedanceVideoMaterialReport(tokens.get(i), getDate, getDate);
-            }
-        }
-    }
-
-    @Autowired
-    private IBytedanceReportService bytedanceReportService;
-    @Test
-    public void loadMatData(){
-        List<UserAllocation> allocations = allocationService.getByParams(289L,null,0);
-        countDownLatch = new CountDownLatch(allocations.size());
-        executorService = Executors.newFixedThreadPool(2);
-        allocations.forEach(allocation -> {
-            executorService.submit(new Runnable() {
-                @Override
-                public void run() {
-                    try {
-                        CtopOauthToken token = tokenService.getTokenByAccountId(allocation.getAccountId());
-                        //获取全量视频素材数据
-                        advertiserDataService.getMaterialList(token);
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    } finally {
-                        countDownLatch.countDown();
-                    }
-                }
-            });
-        });
-        try {
-            countDownLatch.await();
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-        XxlJobLogger.log("物料数据同步完成");
-    }
 }