|
@@ -6,6 +6,7 @@ import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.facade.BehospitalInfoFacade;
|
|
|
import com.diagbot.facade.SysTaskCronFacade;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.scheduling.Trigger;
|
|
@@ -25,6 +26,7 @@ import java.util.Date;
|
|
|
*/
|
|
|
@Configuration //1.主要用于标记配置类,兼备Component的效果。
|
|
|
@EnableScheduling // 2.开启定时任务
|
|
|
+@Slf4j
|
|
|
public class BehospitalInfoAnalyzeTask implements SchedulingConfigurer {
|
|
|
@Autowired
|
|
|
private SysTaskCronFacade sysTaskCronFacade;
|
|
@@ -46,7 +48,7 @@ public class BehospitalInfoAnalyzeTask implements SchedulingConfigurer {
|
|
|
if (null != task001
|
|
|
&& task001.getIsDeleted().equals(IsDeleteEnum.N.getKey())
|
|
|
&& task001.getIsUsed().equals(1)) {
|
|
|
- System.out.println("执行动态定时任务: " + LocalDateTime.now().toLocalTime());
|
|
|
+ log.info("执行动态定时任务: " + LocalDateTime.now().toLocalTime());
|
|
|
behospitalInfoFacade.execute();
|
|
|
}
|
|
|
}
|