数据统计修改

master
dalong306 3 years ago
parent 3e691e214f
commit 968c9b39c3

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>2.3.88</version>
<version>2.3.88-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>2.4.0</jib-maven-plugin.version>

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

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

Loading…
Cancel
Save