|
|
|
@ -70,53 +70,7 @@ public class CustomersAnalysisServiceImp implements CustomersAnalysisService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getChannelAmountAnalysis(JSONObject params) {
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
|
|
|
|
|
// params.put("client_id",0);
|
|
|
|
|
params.put("channel", "Wechat");
|
|
|
|
|
JSONObject wechatPayAmount = customerAndOrdersStatisticsMapper.getSumCustomersChannelAnalysis(params);
|
|
|
|
|
if (wechatPayAmount != null) {
|
|
|
|
|
result.put("wechatPayAmount", wechatPayAmount.getBigDecimal("total_amount"));
|
|
|
|
|
} else {
|
|
|
|
|
result.put("wechatPayAmount", 0.00);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
params.put("channel", "Bestpay");
|
|
|
|
|
JSONObject bestPayAmount = customerAndOrdersStatisticsMapper.getSumCustomersChannelAnalysis(params);
|
|
|
|
|
if (bestPayAmount != null) {
|
|
|
|
|
result.put("bestPayAmount", bestPayAmount.getBigDecimal("total_amount"));
|
|
|
|
|
} else {
|
|
|
|
|
result.put("bestPayAmount", 0.00);
|
|
|
|
|
}
|
|
|
|
|
params.put("channel", "Alipay");
|
|
|
|
|
JSONObject aliPayAmount = customerAndOrdersStatisticsMapper.getSumCustomersChannelAnalysis(params);
|
|
|
|
|
if (aliPayAmount != null) {
|
|
|
|
|
result.put("aliPayAmount", aliPayAmount.getBigDecimal("total_amount"));
|
|
|
|
|
} else {
|
|
|
|
|
result.put("aliPayAmount", 0.00);
|
|
|
|
|
}
|
|
|
|
|
params.put("channel", "jd");
|
|
|
|
|
JSONObject jdPayAmount = customerAndOrdersStatisticsMapper.getSumCustomersChannelAnalysis(params);
|
|
|
|
|
if (jdPayAmount != null) {
|
|
|
|
|
result.put("jdPayAmount", jdPayAmount.getBigDecimal("total_amount"));
|
|
|
|
|
} else {
|
|
|
|
|
result.put("jdPayAmount", 0.00);
|
|
|
|
|
}
|
|
|
|
|
params.put("channel", "AlipayOnline");
|
|
|
|
|
JSONObject aliOnlineAmount = customerAndOrdersStatisticsMapper.getSumCustomersChannelAnalysis(params);
|
|
|
|
|
if (aliOnlineAmount != null) {
|
|
|
|
|
result.put("aliOnlineAmount", aliOnlineAmount.getBigDecimal("total_amount"));
|
|
|
|
|
} else {
|
|
|
|
|
result.put("aliOnlineAmount", 0.00);
|
|
|
|
|
}
|
|
|
|
|
params.put("channel", "hf");
|
|
|
|
|
JSONObject hfPayAmount = customerAndOrdersStatisticsMapper.getSumCustomersChannelAnalysis(params);
|
|
|
|
|
if (hfPayAmount != null) {
|
|
|
|
|
result.put("hfPayAmount", hfPayAmount.getBigDecimal("total_amount"));
|
|
|
|
|
} else {
|
|
|
|
|
result.put("hfPayAmount", 0.00);
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
return customerAndOrdersStatisticsMapper.getChannelCommonCount(params);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|