package com.sd.business.scheduled; import com.sd.business.service.order.OrderSalesShipmentStatisticsService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Profile; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @Profile({"test", "prod"}) @Component public class OrderSalesShipmentStatisticsTask { @Autowired private OrderSalesShipmentStatisticsService orderSalesShipmentStatisticsService; /** * 每天统计前一天的销售出库数量 */ @Scheduled(cron = "0 0 0 * * ?") public void orderSalesShipmentStatistics() { orderSalesShipmentStatisticsService.salesShipmentStatistics(); } }