|
@@ -1,20 +1,27 @@
|
|
|
package com.fdkankan.agent.task;
|
|
|
|
|
|
+import cn.hutool.log.Log;
|
|
|
+import com.fdkankan.agent.config.AgentConfig;
|
|
|
import com.fdkankan.agent.service.IAgentAuthorizeModelingService;
|
|
|
import com.fdkankan.agent.service.IMailTemplateService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@Service
|
|
|
+@Slf4j
|
|
|
public class TaskService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ AgentConfig agentConfig;
|
|
|
|
|
|
@Autowired
|
|
|
IAgentAuthorizeModelingService agentAuthorizeModelingService;
|
|
|
|
|
|
- @Scheduled(cron = "0 0 11 * * ?")
|
|
|
+ @Scheduled(cron = "#{agentConfig.getAuthExpMsg()}")
|
|
|
public void task(){
|
|
|
+ log.info("定时任务启动");
|
|
|
agentAuthorizeModelingService.checkExpTime();
|
|
|
}
|
|
|
}
|