Merge remote-tracking branch 'origin/stable-beforeaps' into stable-beforeaps

master
Yixian 3 years ago
commit 1869a872e7

@ -591,10 +591,9 @@ public class DashboardServiceImpl implements DashboardService, DashboardAnalysis
} }
params.put("channel", record.getString("channel")); params.put("channel", record.getString("channel"));
int newCustomers = 0; int newCustomers = 0;
int oldCustomers = transactionAnalysisMapper.countOldCustomers(params); int oldCustomers=0;
if (client.getIntValue("client_id") == 0) { if (client.getIntValue("client_id") != 0) {
newCustomers = record.getIntValue("customers") - oldCustomers; oldCustomers = transactionAnalysisMapper.countOldCustomers(params);
} else {
newCustomers = transactionAnalysisMapper.countNewCustomers(params); newCustomers = transactionAnalysisMapper.countNewCustomers(params);
} }
record.put("new_customers", newCustomers); record.put("new_customers", newCustomers);

@ -23,7 +23,7 @@ public class DashboardTaskManager {
@Resource @Resource
private SynchronizedScheduler synchronizedScheduler; private SynchronizedScheduler synchronizedScheduler;
@Scheduled(cron = "0 0 2 * * ?") @Scheduled(cron = "0 30 1 * * ?")
public void analysisDashboard() { public void analysisDashboard() {
synchronizedScheduler.executeProcess("manage_task:dashboardTask", 120_000, synchronizedScheduler.executeProcess("manage_task:dashboardTask", 120_000,
() -> dashboardService.generateCustomersAndOrdersStatistics(DateUtils.addDays(new Date(), -1))); () -> dashboardService.generateCustomersAndOrdersStatistics(DateUtils.addDays(new Date(), -1)));

Loading…
Cancel
Save