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"));