#20230510 欣影管理平台装置信息查询代码
parent
21b87aa9f5
commit
edfe19c953
@ -0,0 +1,29 @@
|
|||||||
|
package com.shxy.xymanager_framework.timeTask;
|
||||||
|
|
||||||
|
import com.shxy.xymanager_framework.timeTask.TerminalTime.TerminalTask;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author CY
|
||||||
|
* @date 2021-01-27 15:06
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@EnableScheduling
|
||||||
|
@Slf4j
|
||||||
|
public class ScheduledTask {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TerminalTask terminalTask;
|
||||||
|
|
||||||
|
|
||||||
|
@Scheduled(cron = "0 0/2 * * * ?")
|
||||||
|
private void terminalTask() {
|
||||||
|
log.info("我进来了");
|
||||||
|
terminalTask.execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.shxy.xymanager_framework.timeTask.TerminalTime;
|
||||||
|
|
||||||
|
import com.shxy.xymanager_service.service.TerminalScheduleRuleService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Bobi_huo
|
||||||
|
* @date 2020-12-22 15:12
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component("TerminalTask")
|
||||||
|
public class TerminalTask {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
TerminalScheduleRuleService terminalScheduleRuleService;
|
||||||
|
/**
|
||||||
|
* 下发结束
|
||||||
|
*/
|
||||||
|
public void execute() {
|
||||||
|
terminalScheduleRuleService.timerscheckScheldule();
|
||||||
|
log.info("-- >>> 下发结束");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue