package com.iailab.module.job.task; import com.iailab.module.device.service.DeviceInfoService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Resource; import org.springframework.stereotype.Component; /** * 同步中选设备 * * @author PanZhibao * @Description * @createTime 2024年05月27日 */ @Component("syncDeviceInfoTask") public class SyncDeviceInfoTask implements ITask { private Logger logger = LoggerFactory.getLogger(getClass()); @Resource private DeviceInfoService deviceInfoService; @Override public void run(String params) { try { logger.info("SyncDeviceInfoTask 开始"); deviceInfoService.syncData(); logger.info("SyncDeviceInfoTask 完成"); } catch (Exception ex) { logger.info("SyncDeviceInfoTask 异常"); ex.printStackTrace(); } } }