Sfoglia il codice sorgente

删除显式执行线程池shutdown操作代码

syh 4 anni fa
parent
commit
d3323a240a

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

@@ -1392,9 +1392,6 @@ public class TestController {
         } catch (InterruptedException e) {
             e.printStackTrace();
         }
-        if(!executorService.isShutdown()){
-            executorService.shutdown();
-        }
         etlReportBytedanceVideoService.cleanETL(date);
         ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
         return result;

+ 7 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysDepartServiceImpl.java

@@ -19,6 +19,7 @@ import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
 import java.util.*;
 
 /**
@@ -32,17 +33,17 @@ import java.util.*;
 @Service
 public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart> implements ISysDepartService {
 
-    @Autowired
+    @Resource
     private SysUserDepartMapper userDepartMapper;
-    @Autowired
+    @Resource
     private SysDepartRoleMapper sysDepartRoleMapper;
-    @Autowired
+    @Resource
     private SysDepartPermissionMapper departPermissionMapper;
-    @Autowired
+    @Resource
     private SysDepartRolePermissionMapper departRolePermissionMapper;
-    @Autowired
+    @Resource
     private SysDepartRoleUserMapper departRoleUserMapper;
-    @Autowired
+    @Resource
     private SysDepartMapper sysDepartMapper;
 
     @Override

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

@@ -465,12 +465,14 @@ public class SampleTest {
 
     @Test
     public void etlKuaishouData() {
-        String dateString = "2021-01-05";
+        String dateString = "2020-07-18";
         Date startDate = DateUtils.parseDate(dateString, "yyyy-MM-dd");
-        for (int i = 0; i <= 10; i++) {
+        for (int i = 0; i <= 450; i++) {
             Date getDate = DateUtils.addDay(startDate, i);
-            kuaishouVideoEtlInfoService.etlKuaishouVideoInfo(getDate);
-            bytedanceVideoEtlInfoService.etlBytedanceVideoInfo(getDate);
+            kuaishouVideoEtlInfoService.etlKuaishouVideoInfoGroupByProjectId(getDate);
+//            bytedanceVideoEtlInfoService.etlBytedanceVideoInfoByProjectId(getDate);
+//            kuaishouVideoEtlInfoService.etlKuaishouVideoInfo(getDate);
+//            bytedanceVideoEtlInfoService.etlBytedanceVideoInfo(getDate);
         }
     }
 

+ 9 - 0
module-job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceEtlVideoJob.java

@@ -21,4 +21,13 @@ public class BytedanceEtlVideoJob {
             bytedanceVideoEtlInfoService.etlBytedanceVideoInfo(getDate);
         }
     }
+
+    @XxlJob("bytedanceEtlVideoProjectJob")
+    public void bytedanceEtlVideoProjectJob() throws Exception {
+        Date startDate = DateUtils.addDay(new Date(),-2);
+        for(int i=0;i<=2;i++){
+            Date getDate = DateUtils.addDay(startDate,i);
+            bytedanceVideoEtlInfoService.etlBytedanceVideoInfoByProjectId(getDate);
+        }
+    }
 }

+ 9 - 0
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouEtlVideoJob.java

@@ -21,4 +21,13 @@ public class KuaishouEtlVideoJob {
             kuaishouVideoEtlInfoService.etlKuaishouVideoInfo(getDate);
         }
     }
+
+    @XxlJob("kuaishouEtlProjectVideoJob")
+    public void kuaishouEtlProjectVideoJob() throws Exception {
+        Date startDate = DateUtils.addDay(new Date(),-2);
+        for(int i=0;i<=2;i++){
+            Date getDate = DateUtils.addDay(startDate,i);
+            kuaishouVideoEtlInfoService.etlKuaishouVideoInfoGroupByProjectId(getDate);
+        }
+    }
 }