TASK:mixi;

This commit is contained in:
shahaibo
2024-05-07 16:33:41 +08:00
parent 90862b2a0f
commit 7bebd54faa

View File

@@ -57,10 +57,10 @@ public class MiTuExportScheduledTask {
@PostConstruct @PostConstruct
public void executeWeeklyHeavyStockReport() { public void executeWeeklyHeavyStockReport() {
customerPurchaseReport(); customerPurchaseReport();
NewJoinVIPReport(); // NewJoinVIPReport();
weeklySellThrReport(); // weeklySellThrReport();
WeeklyHeavyStockReport(); // WeeklyHeavyStockReport();
QuarterlyProductGroupingReport(); // QuarterlyProductGroupingReport();
// customerTypeAnalysis(); // customerTypeAnalysis();
// getBestSell(); // getBestSell();
} }
@@ -319,9 +319,9 @@ public class MiTuExportScheduledTask {
@Retryable(value = Exception.class, maxAttempts = 3, backoff = @Backoff(delay = 1000)) @Retryable(value = Exception.class, maxAttempts = 3, backoff = @Backoff(delay = 1000))
@Scheduled(cron = "0 0 23 28-31 * ?") @Scheduled(cron = "0 0 23 28-31 * ?")
public void customerPurchaseReport() { public void customerPurchaseReport() {
final Calendar c = Calendar.getInstance(); // final Calendar c = Calendar.getInstance();
//如果是最后一天 则执行定时任务 // 如果是最后一天 则执行定时任务
if (c.get(Calendar.DATE) == c.getActualMaximum(Calendar.DATE)) { // if (c.get(Calendar.DATE) == c.getActualMaximum(Calendar.DATE)) {
MiTuExport miTuExport = createMiTuExport("Customer purchase report", "month"); MiTuExport miTuExport = createMiTuExport("Customer purchase report", "month");
try { try {
List<TransactionData> transactionData = retrieveTransactionData(); List<TransactionData> transactionData = retrieveTransactionData();
@@ -339,7 +339,7 @@ public class MiTuExportScheduledTask {
miTuExportMapper.insert(miTuExport); miTuExportMapper.insert(miTuExport);
System.out.println("接口执行完成!"); System.out.println("接口执行完成!");
} }
} // }
} }
private MiTuExport createMiTuExport(String fileName, String period) { private MiTuExport createMiTuExport(String fileName, String period) {