package com.iailab.module.job.task; import com.iailab.module.prod.service.PrdCurrentSaleService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Resource; import org.springframework.stereotype.Component; /** * 同步当前销量 * * @author PanZhibao * @Description * @createTime 2024年05月26日 */ @Component("syncPrdCurrentSaleTask") public class SyncPrdCurrentSaleTask implements ITask { private Logger logger = LoggerFactory.getLogger(getClass()); @Resource private PrdCurrentSaleService prdCurrentSaleService; @Override public void run(String params) { try { logger.info("SyncPrdCurrentSaleTask 开始"); prdCurrentSaleService.syncData(); logger.info("SyncPrdCurrentSaleTask 完成"); } catch (Exception ex) { logger.info("SyncPrdCurrentSaleTask 异常"); ex.printStackTrace(); } } }