package com.iailab.module.job.task; import com.iailab.module.prod.service.PrdTimeDayService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Resource; import org.springframework.stereotype.Component; /** * 同步生产时间分布 * 0 0 0/1 * * ? * * @author PanZhibao * @Description * @createTime 2024年06月16日 */ @Component("syncPrdTimeDayTask") public class SyncPrdTimeDayTask implements ITask { private Logger logger = LoggerFactory.getLogger(getClass()); @Resource private PrdTimeDayService prdTimeDayService; @Override public void run(String params) { try { logger.info("SyncPrdTimeDayTask 开始"); prdTimeDayService.syncData(params); logger.info("SyncPrdTimeDayTask 完成"); } catch (Exception ex) { logger.info("SyncPrdTimeDayTask 异常"); ex.printStackTrace(); } } }