|
|
@ -2,6 +2,7 @@ package au.com.royalpay.payment.manage.task;
|
|
|
|
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.EstimateAnalysisService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.EstimateAnalysisService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.PlatformClearService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.PlatformClearService;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.scheduler.SynchronizedScheduler;
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
@ -19,26 +20,28 @@ public class SettleEstimateTaskManger {
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private PlatformClearService platformClearService;
|
|
|
|
private PlatformClearService platformClearService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private SynchronizedScheduler synchronizedScheduler;
|
|
|
|
|
|
|
|
|
|
|
|
// 3:15 am at every work days
|
|
|
|
// 3:15 am at every work days
|
|
|
|
@Scheduled(cron = "0 20 3 * * ?")
|
|
|
|
@Scheduled(cron = "0 20 3 * * ?")
|
|
|
|
public void generateSettleAmount() {
|
|
|
|
public void generateSettleAmount() {
|
|
|
|
estimateAnalysisService.generateSettleAmount();
|
|
|
|
synchronizedScheduler.executeProcess("manage_task:genSettleAmount", 120_000, () -> estimateAnalysisService.generateSettleAmount());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 2:15 every day
|
|
|
|
// 2:15 every day
|
|
|
|
@Scheduled(cron = "0 0 3 * * ?")
|
|
|
|
@Scheduled(cron = "0 0 3 * * ?")
|
|
|
|
public void generateTransactionAmount() {
|
|
|
|
public void generateTransactionAmount() {
|
|
|
|
estimateAnalysisService.generateTransactionData();
|
|
|
|
synchronizedScheduler.executeProcess("manage_task:genTransAmount", 120_000, () -> estimateAnalysisService.generateTransactionData());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 0 13 * * ?")
|
|
|
|
@Scheduled(cron = "0 0 13 * * ?")
|
|
|
|
public void generateSettleLogs() {
|
|
|
|
public void generateSettleLogs() {
|
|
|
|
platformClearService.generateSettleLogs();
|
|
|
|
synchronizedScheduler.executeProcess("manage_task:genSettleLog", 120_000, () -> platformClearService.generateSettleLogs());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 0 10 * * ?")
|
|
|
|
@Scheduled(cron = "0 0 10 * * ?")
|
|
|
|
public void generateSettleLogs2() {
|
|
|
|
public void generateSettleLogs2() {
|
|
|
|
platformClearService.generateSettleLogs();
|
|
|
|
synchronizedScheduler.executeProcess("manage_task:genSettleLog", 120_000, () -> platformClearService.generateSettleLogs());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|