Sfoglia il codice sorgente

注释掉任务,防止过多垃圾数据进来

尚正平 2 anni fa
parent
commit
e2dbd536a0
1 ha cambiato i file con 28 aggiunte e 28 eliminazioni
  1. 28 28
      src/main/java/com/diagbot/task/BehospitalInfoAnalyzeTask.java

+ 28 - 28
src/main/java/com/diagbot/task/BehospitalInfoAnalyzeTask.java

@@ -44,33 +44,33 @@ public class BehospitalInfoAnalyzeTask implements SchedulingConfigurer {
      */
     @Override
     public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
-        taskRegistrar.addTriggerTask(new Runnable() {
-            @Override
-            public void run() {
-                //1.添加任务内容(Runnable)
-                if (null != task001
-                        && task001.getIsDeleted().equals(IsDeleteEnum.N.getKey())
-                        && task001.getIsUsed().equals(1)) {
-                    log.info("执行动态定时任务: " + LocalDateTime.now().toLocalTime());
-                    TaskVO taskVO = new TaskVO();
-                    behospitalInfoFacade.execute(taskVO, param);
-                }
-            }
-        }, new Trigger() {
-            @Override
-            public Date nextExecutionTime(TriggerContext triggerContext) {
-                //2.1 从数据库获取执行周期
-                task001 = sysTaskCronFacade.getOne(new QueryWrapper<SysTaskCron>()
-                        .eq("cron_code", "TASK001"), false);
-                String cron = "0/5 * * * * ?";
-                //2.2 合法性校验.
-                if (null != task001 && StringUtil.isNotBlank(task001.getCron())) {
-                    cron = task001.getCron();
-                    param = task001.getParam();
-                }
-                CronTrigger trigger = new CronTrigger(cron);
-                return trigger.nextExecutionTime(triggerContext);
-            }
-        });
+//        taskRegistrar.addTriggerTask(new Runnable() {
+//            @Override
+//            public void run() {
+//                //1.添加任务内容(Runnable)
+//                if (null != task001
+//                        && task001.getIsDeleted().equals(IsDeleteEnum.N.getKey())
+//                        && task001.getIsUsed().equals(1)) {
+//                    log.info("执行动态定时任务: " + LocalDateTime.now().toLocalTime());
+//                    TaskVO taskVO = new TaskVO();
+//                    behospitalInfoFacade.execute(taskVO, param);
+//                }
+//            }
+//        }, new Trigger() {
+//            @Override
+//            public Date nextExecutionTime(TriggerContext triggerContext) {
+//                //2.1 从数据库获取执行周期
+//                task001 = sysTaskCronFacade.getOne(new QueryWrapper<SysTaskCron>()
+//                        .eq("cron_code", "TASK001"), false);
+//                String cron = "0/5 * * * * ?";
+//                //2.2 合法性校验.
+//                if (null != task001 && StringUtil.isNotBlank(task001.getCron())) {
+//                    cron = task001.getCron();
+//                    param = task001.getParam();
+//                }
+//                CronTrigger trigger = new CronTrigger(cron);
+//                return trigger.nextExecutionTime(triggerContext);
+//            }
+//        });
     }
 }