|
|
|
@ -64,7 +64,6 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
|
private MerchantInfoProvider merchantInfoProvider;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getCommonAnalysis1(JSONObject params) {
|
|
|
|
|
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);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private JSONObject getYesOrLasMonth(JSONObject params) {
|
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
|
res.put("traded_partners", customerAndOrdersStatisticsMapper.countTradedClients(params));
|
|
|
|
@ -277,6 +277,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
|
analysis.add(wechatHtml5);
|
|
|
|
|
return analysis;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<JSONObject> getPartnerTradeAnalysisInDays(JSONObject params) {
|
|
|
|
|
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 partnerAnalysisBean
|
|
|
|
|
* @return
|
|
|
|
@ -383,6 +385,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
|
res.put(key, new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)));
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private JSONObject getTransJSONO(JSONObject params) {
|
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
|
JSONObject object = transactionAnalysisMapper.getClientTransaction(params);
|
|
|
|
@ -391,6 +394,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
|
res.put("customers", transactionAnalysisMapper.countCustomers(params));
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<JSONObject> getTradeAnalysisInHours(JSONObject partner, AnalysisBean partnerAnalysisBean) {
|
|
|
|
|
String timezone = partner.getJSONObject("client").getString("timezone");
|
|
|
|
@ -533,10 +537,12 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
|
JSONObject totalObject = new JSONObject();
|
|
|
|
|
totalObject.put("client_id", 0);
|
|
|
|
|
generateData(format, date, totalObject);
|
|
|
|
|
logger.info("generate customer and orders statistics on {} done", date);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 重新生成执行商户下某日消费者数据
|
|
|
|
|
*
|
|
|
|
|
* @param analysisDate
|
|
|
|
|
* @param clientId
|
|
|
|
|
*/
|
|
|
|
@ -599,6 +605,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getPlatformAmount(JSONObject params) {
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private JSONObject getTodayChannelCount(JSONObject params) {
|
|
|
|
|
String[] channels = new String[]{"Wechat", "Alipay", "AlipayOnline", "Rpay", "rpaypmt_card", "rpaypmt_dd"};
|
|
|
|
|
JSONObject resp = new JSONObject();
|
|
|
|
@ -630,6 +638,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
|
|
|
|
|
}
|
|
|
|
|
return resp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getOrderAndCustomerPerDay(JSONObject partner, AnalysisBean partnerAnalysisBean) {
|
|
|
|
|
String timezone = partner.getJSONObject("client").getString("timezone");
|
|
|
|
|