|
|
@ -64,7 +64,6 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
private MerchantInfoProvider merchantInfoProvider;
|
|
|
|
private MerchantInfoProvider merchantInfoProvider;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public JSONObject getCommonAnalysis1(JSONObject params) {
|
|
|
|
public JSONObject getCommonAnalysis1(JSONObject params) {
|
|
|
|
String jsonStr = stringRedisTemplate.boundValueOps("org_commonAnalysis1" + params.getString("org_id") + params.getString("begin")).get();
|
|
|
|
String jsonStr = stringRedisTemplate.boundValueOps("org_commonAnalysis1" + params.getString("org_id") + params.getString("begin")).get();
|
|
|
@ -126,6 +125,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
stringRedisTemplate.boundValueOps("org_commonAnalysis2" + params.getString("org_id") + params.getString("begin")).set(res.toJSONString(), 5, TimeUnit.MINUTES);
|
|
|
|
stringRedisTemplate.boundValueOps("org_commonAnalysis2" + params.getString("org_id") + params.getString("begin")).set(res.toJSONString(), 5, TimeUnit.MINUTES);
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private JSONObject getYesOrLasMonth(JSONObject params) {
|
|
|
|
private JSONObject getYesOrLasMonth(JSONObject params) {
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
res.put("traded_partners", customerAndOrdersStatisticsMapper.countTradedClients(params));
|
|
|
|
res.put("traded_partners", customerAndOrdersStatisticsMapper.countTradedClients(params));
|
|
|
@ -277,6 +277,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
analysis.add(wechatHtml5);
|
|
|
|
analysis.add(wechatHtml5);
|
|
|
|
return analysis;
|
|
|
|
return analysis;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<JSONObject> getPartnerTradeAnalysisInDays(JSONObject params) {
|
|
|
|
public List<JSONObject> getPartnerTradeAnalysisInDays(JSONObject params) {
|
|
|
|
int date_range = Integer.parseInt(DurationFormatUtils.formatPeriod(params.getDate("begin").getTime(), params.getDate("end").getTime(), "dd"));
|
|
|
|
int date_range = Integer.parseInt(DurationFormatUtils.formatPeriod(params.getDate("begin").getTime(), params.getDate("end").getTime(), "dd"));
|
|
|
@ -354,6 +355,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 根据渠道号分别加载未清算金额
|
|
|
|
* 根据渠道号分别加载未清算金额
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param partner
|
|
|
|
* @param partner
|
|
|
|
* @param partnerAnalysisBean
|
|
|
|
* @param partnerAnalysisBean
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
@ -383,6 +385,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
res.put(key, new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)));
|
|
|
|
res.put(key, new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)));
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private JSONObject getTransJSONO(JSONObject params) {
|
|
|
|
private JSONObject getTransJSONO(JSONObject params) {
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
JSONObject object = transactionAnalysisMapper.getClientTransaction(params);
|
|
|
|
JSONObject object = transactionAnalysisMapper.getClientTransaction(params);
|
|
|
@ -391,6 +394,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
res.put("customers", transactionAnalysisMapper.countCustomers(params));
|
|
|
|
res.put("customers", transactionAnalysisMapper.countCustomers(params));
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<JSONObject> getTradeAnalysisInHours(JSONObject partner, AnalysisBean partnerAnalysisBean) {
|
|
|
|
public List<JSONObject> getTradeAnalysisInHours(JSONObject partner, AnalysisBean partnerAnalysisBean) {
|
|
|
|
String timezone = partner.getJSONObject("client").getString("timezone");
|
|
|
|
String timezone = partner.getJSONObject("client").getString("timezone");
|
|
|
@ -533,10 +537,12 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
JSONObject totalObject = new JSONObject();
|
|
|
|
JSONObject totalObject = new JSONObject();
|
|
|
|
totalObject.put("client_id", 0);
|
|
|
|
totalObject.put("client_id", 0);
|
|
|
|
generateData(format, date, totalObject);
|
|
|
|
generateData(format, date, totalObject);
|
|
|
|
|
|
|
|
logger.info("generate customer and orders statistics on {} done", date);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 重新生成执行商户下某日消费者数据
|
|
|
|
* 重新生成执行商户下某日消费者数据
|
|
|
|
|
|
|
|
*
|
|
|
|
* @param analysisDate
|
|
|
|
* @param analysisDate
|
|
|
|
* @param clientId
|
|
|
|
* @param clientId
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -599,6 +605,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public JSONObject getPlatformAmount(JSONObject params) {
|
|
|
|
public JSONObject getPlatformAmount(JSONObject params) {
|
|
|
|
String jsonStr = stringRedisTemplate.boundValueOps("org_ChannelAnalysis" + params.getString("org_id") + params.getString("begin")).get();
|
|
|
|
String jsonStr = stringRedisTemplate.boundValueOps("org_ChannelAnalysis" + params.getString("org_id") + params.getString("begin")).get();
|
|
|
@ -620,6 +627,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
return resp;
|
|
|
|
return resp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private JSONObject getTodayChannelCount(JSONObject params) {
|
|
|
|
private JSONObject getTodayChannelCount(JSONObject params) {
|
|
|
|
String[] channels = new String[]{"Wechat", "Alipay", "AlipayOnline", "Rpay", "rpaypmt_card", "rpaypmt_dd"};
|
|
|
|
String[] channels = new String[]{"Wechat", "Alipay", "AlipayOnline", "Rpay", "rpaypmt_card", "rpaypmt_dd"};
|
|
|
|
JSONObject resp = new JSONObject();
|
|
|
|
JSONObject resp = new JSONObject();
|
|
|
@ -630,6 +638,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return resp;
|
|
|
|
return resp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public JSONObject getOrderAndCustomerPerDay(JSONObject partner, AnalysisBean partnerAnalysisBean) {
|
|
|
|
public JSONObject getOrderAndCustomerPerDay(JSONObject partner, AnalysisBean partnerAnalysisBean) {
|
|
|
|
String timezone = partner.getJSONObject("client").getString("timezone");
|
|
|
|
String timezone = partner.getJSONObject("client").getString("timezone");
|
|
|
|