23 lines
563 B
Java
23 lines
563 B
Java
|
|
package com.whdc.zhdbaqapi.component;
|
||
|
|
|
||
|
|
import com.whdc.zhdbaqapi.service.IDeviceDataService;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
||
|
|
import org.springframework.stereotype.Component;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author 李赛
|
||
|
|
* @date 2022-07-22 1:04
|
||
|
|
*/
|
||
|
|
@Component
|
||
|
|
public class ScheduledTask {
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
private IDeviceDataService iDeviceDataService;
|
||
|
|
|
||
|
|
@Scheduled(fixedDelay = 60000)
|
||
|
|
public void scheduledTask() {
|
||
|
|
iDeviceDataService.syncData();
|
||
|
|
}
|
||
|
|
}
|