package com.kmall.admin.task; import com.kmall.admin.service.SalesDetailService; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; /** * 线下订单数据推送接口 */ @Component("salsDetailTask") @EnableScheduling @EnableAsync public class SalsDetailTask { private static Log logger = LogFactory.getLog(SalsDetailTask.class); @Autowired private SalesDetailService salesDetailService; /** * 每天向eccs推送销售明细数据 */ @Scheduled(cron = "0 30 0 * * ?") public void pushSalesDetailData() { logger.info(">>>>>>>>>>>>>>>>>>>>pushSalesDetailData is start "); salesDetailService.pushSalesDetailData(); logger.info(">>>>>>>>>>>>>>>>>>>>pushSalesDetailData is end "); } /** * 每天向eccs重推销售明细数据 */ @Scheduled(cron = "0 30 0 * * ?") public void pushSalesDetailDataAgain() { logger.info(">>>>>>>>>>>>>>>>>>>>pushSalesDetailDataAgain is start "); salesDetailService.pushSalesDetailDataAgain(); logger.info(">>>>>>>>>>>>>>>>>>>>pushSalesDetailDataAgain is end "); } }