OrderSalesShipmentStatisticsTask.java 757 B

1234567891011121314151617181920212223
  1. package com.sd.business.scheduled;
  2. import com.sd.business.service.order.OrderSalesShipmentStatisticsService;
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.context.annotation.Profile;
  5. import org.springframework.scheduling.annotation.Scheduled;
  6. import org.springframework.stereotype.Component;
  7. @Profile({"test", "prod"})
  8. @Component
  9. public class OrderSalesShipmentStatisticsTask {
  10. @Autowired
  11. private OrderSalesShipmentStatisticsService orderSalesShipmentStatisticsService;
  12. /**
  13. * 每天统计前一天的销售出库数量
  14. */
  15. @Scheduled(cron = "0 0 0 * * ?")
  16. public void orderSalesShipmentStatistics() {
  17. orderSalesShipmentStatisticsService.salesShipmentStatistics();
  18. }
  19. }