package com.iailab.module.job.task; import com.iailab.module.cons.service.ConsDayDataService; 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("syncConsDayDataTask") public class SyncConsDayDataTask implements ITask { private Logger logger = LoggerFactory.getLogger(getClass()); @Resource private ConsDayDataService consDayDataService; @Override public void run(String params) { try { logger.info("SyncConsDayDataTask 开始"); consDayDataService.syncData(); logger.info("SyncConsDayDataTask 完成"); } catch (Exception ex) { logger.info("SyncConsDayDataTask 异常"); ex.printStackTrace(); } } }