|
|
@ -4,6 +4,7 @@ import au.com.royalpay.payment.manage.analysis.beans.AnalysisBean;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.DashboardService;
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.DashboardService;
|
|
|
|
import au.com.royalpay.payment.manage.organizations.core.OrgManager;
|
|
|
|
import au.com.royalpay.payment.manage.organizations.core.OrgManager;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection;
|
|
|
|
import au.com.royalpay.payment.tools.env.SysConfigManager;
|
|
|
|
import au.com.royalpay.payment.tools.env.SysConfigManager;
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.RequirePartner;
|
|
|
|
import au.com.royalpay.payment.manage.permission.manager.RequirePartner;
|
|
|
@ -30,6 +31,7 @@ public class DashboardController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/common_analysis_1")
|
|
|
|
@ManagerMapping("/common_analysis_1")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public JSONObject commonAnalysis1(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public JSONObject commonAnalysis1(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
@ -37,6 +39,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/common_analysis_3")
|
|
|
|
@ManagerMapping("/common_analysis_3")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public JSONObject commonAnalysis3(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public JSONObject commonAnalysis3(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
@ -44,6 +47,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/common_analysis_4")
|
|
|
|
@ManagerMapping("/common_analysis_4")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public JSONObject commonAnalysis4(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public JSONObject commonAnalysis4(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
@ -51,6 +55,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/common_analysis_2")
|
|
|
|
@ManagerMapping("/common_analysis_2")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public JSONObject commonAnalysis2(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public JSONObject commonAnalysis2(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
@ -58,6 +63,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/trade_in_types")
|
|
|
|
@ManagerMapping("/trade_in_types")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public List<JSONObject> tradeInTypes(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public List<JSONObject> tradeInTypes(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
@ -65,6 +71,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/top_trade_partners")
|
|
|
|
@ManagerMapping("/top_trade_partners")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public List<JSONObject> topTradePartners(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
|
|
|
|
public List<JSONObject> topTradePartners(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
|
|
|
|
@RequestParam(defaultValue = "10") int limit) {
|
|
|
|
@RequestParam(defaultValue = "10") int limit) {
|
|
|
|
|
|
|
|
|
|
|
@ -75,6 +82,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/rank_trade_partners")
|
|
|
|
@ManagerMapping("/rank_trade_partners")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public List<JSONObject> rankTradePartners(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public List<JSONObject> rankTradePartners(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
|
orgManager.checkOrg(manager, params);
|
|
|
|
orgManager.checkOrg(manager, params);
|
|
|
@ -88,6 +96,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/trade_in_hours")
|
|
|
|
@ManagerMapping("/trade_in_hours")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public List<JSONObject> tradeInHours(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public List<JSONObject> tradeInHours(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
@ -101,6 +110,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/fee_analysis")
|
|
|
|
@ManagerMapping("/fee_analysis")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public List<JSONObject> tradeInDays(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public List<JSONObject> tradeInDays(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
@ -108,6 +118,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/new_clients")
|
|
|
|
@ManagerMapping("/new_clients")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public List<JSONObject> clientsTradeInDays(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public List<JSONObject> clientsTradeInDays(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
@ -115,6 +126,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/partners_in_types")
|
|
|
|
@ManagerMapping("/partners_in_types")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public List<JSONObject> partnersInTypes(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public List<JSONObject> partnersInTypes(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
@ -128,6 +140,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/gateway/{trade_type}/partners")
|
|
|
|
@ManagerMapping("/gateway/{trade_type}/partners")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public List<JSONObject> getPartnersByTradeType(@PathVariable String trade_type, AnalysisBean analysis,
|
|
|
|
public List<JSONObject> getPartnersByTradeType(@PathVariable String trade_type, AnalysisBean analysis,
|
|
|
|
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
@ -144,6 +157,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/trade_in_time")
|
|
|
|
@ManagerMapping("/trade_in_time")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public List<JSONObject> tradeInTime(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public List<JSONObject> tradeInTime(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
|
JSONObject params = analysis.toParams(null);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
@ -151,17 +165,20 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/exchange_rates")
|
|
|
|
@ManagerMapping("/exchange_rates")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
@RequirePartner
|
|
|
|
@RequirePartner
|
|
|
|
public List<JSONObject> getExchangeRateHistory(@RequestParam String begin, @RequestParam String end) {
|
|
|
|
public List<JSONObject> getExchangeRateHistory(@RequestParam String begin, @RequestParam String end) {
|
|
|
|
return dashboardService.listExchangeRateHistory(begin, end);
|
|
|
|
return dashboardService.listExchangeRateHistory(begin, end);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/max_record")
|
|
|
|
@ManagerMapping("/max_record")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public JSONObject getMaxRecord(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
public JSONObject getMaxRecord(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
|
|
|
|
return dashboardService.getNewRecord();
|
|
|
|
return dashboardService.getNewRecord();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping("/Total_platform_amount")
|
|
|
|
@ManagerMapping("/Total_platform_amount")
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public JSONObject getPlatformAmount(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
|
|
|
|
public JSONObject getPlatformAmount(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
JSONObject params = analysis.toParams(analysis.getTimezone());
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
|
orgManager.checkOrg(manager,params);
|
|
|
@ -169,6 +186,7 @@ public class DashboardController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ManagerMapping(value = "/dashboard_base", method = RequestMethod.GET)
|
|
|
|
@ManagerMapping(value = "/dashboard_base", method = RequestMethod.GET)
|
|
|
|
|
|
|
|
@ReadOnlyConnection
|
|
|
|
public JSONObject getDashBoardBaseConfig() {
|
|
|
|
public JSONObject getDashBoardBaseConfig() {
|
|
|
|
JSONObject config = sysConfigManager.getSysConfig();
|
|
|
|
JSONObject config = sysConfigManager.getSysConfig();
|
|
|
|
JSONObject limits = new JSONObject();
|
|
|
|
JSONObject limits = new JSONObject();
|
|
|
|