From 278d362b050bce3fd838df0ef059dfcf1a353283 Mon Sep 17 00:00:00 2001 From: eason Date: Fri, 27 Jul 2018 13:06:21 +0800 Subject: [PATCH] fix new customers --- .../manage/analysis/core/impls/DashboardServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 a1591b5dd..75cff47fa 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 @@ -492,12 +492,12 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT } params.put("channel",record.getString("channel")); int newCustomers = 0; + int oldCustomers = transactionAnalysisMapper.countOldCustomers(params); if (client.getIntValue("client_id")==0){ - newCustomers = transactionAnalysisMapper.getCountCustomers(params.getDate("end")) - transactionAnalysisMapper.getCountCustomers(params.getDate("begin")); + newCustomers = record.getIntValue("customers")-oldCustomers; }else { newCustomers = transactionAnalysisMapper.countNewCustomers(params); } - int oldCustomers = transactionAnalysisMapper.countOldCustomers(params); record.put("new_customers",newCustomers); record.put("old_customers",oldCustomers); record.put("client_id",client.getIntValue("client_id"));