fix new customers

master
eason 6 years ago
parent b9398f2cfa
commit 278d362b05

@ -492,12 +492,12 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
} }
params.put("channel",record.getString("channel")); params.put("channel",record.getString("channel"));
int newCustomers = 0; int newCustomers = 0;
int oldCustomers = transactionAnalysisMapper.countOldCustomers(params);
if (client.getIntValue("client_id")==0){ if (client.getIntValue("client_id")==0){
newCustomers = transactionAnalysisMapper.getCountCustomers(params.getDate("end")) - transactionAnalysisMapper.getCountCustomers(params.getDate("begin")); newCustomers = record.getIntValue("customers")-oldCustomers;
}else { }else {
newCustomers = transactionAnalysisMapper.countNewCustomers(params); newCustomers = transactionAnalysisMapper.countNewCustomers(params);
} }
int oldCustomers = transactionAnalysisMapper.countOldCustomers(params);
record.put("new_customers",newCustomers); record.put("new_customers",newCustomers);
record.put("old_customers",oldCustomers); record.put("old_customers",oldCustomers);
record.put("client_id",client.getIntValue("client_id")); record.put("client_id",client.getIntValue("client_id"));

Loading…
Cancel
Save