From 968c9b39c3a3b993f8c2e9499a06beb2678458ce Mon Sep 17 00:00:00 2001
From: dalong306 <304592994@qq.com>
Date: Tue, 16 Nov 2021 13:46:24 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 2 +-
.../manage/analysis/core/impls/DashboardServiceImpl.java | 7 +++----
.../royalpay/payment/manage/task/DashboardTaskManager.java | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/pom.xml b/pom.xml
index 0ad19d395..2934cc261 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
4.0.0
manage
- 2.3.88
+ 2.3.88-SNAPSHOT
UTF-8
2.4.0
diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java
index ebb485bf3..688811793 100644
--- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java
@@ -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);
diff --git a/src/main/java/au/com/royalpay/payment/manage/task/DashboardTaskManager.java b/src/main/java/au/com/royalpay/payment/manage/task/DashboardTaskManager.java
index 9003942f1..a89e3e032 100644
--- a/src/main/java/au/com/royalpay/payment/manage/task/DashboardTaskManager.java
+++ b/src/main/java/au/com/royalpay/payment/manage/task/DashboardTaskManager.java
@@ -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)));