package com.iailab.module.job.task; import com.iailab.module.prod.service.PrdDayDutyService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Resource; import org.springframework.stereotype.Component; /** * 同步值班信息 * 0 0 0/2 * * ? * * @author PanZhibao * @Description * @createTime 2024年05月26日 */ @Component("syncPrdDayDutyTask") public class SyncPrdDayDutyTask implements ITask { private Logger logger = LoggerFactory.getLogger(getClass()); @Resource private PrdDayDutyService prdDayDutyService; @Override public void run(String params) { try { logger.info("syncPrdDayDutyTask 开始"); prdDayDutyService.syncData(); logger.info("syncPrdDayDutyTask 完成"); } catch (Exception ex) { logger.info("syncPrdDayDutyTask 异常"); ex.printStackTrace(); } } }