From abce303d140b91fa7d58f8529c4d83f9a88841a8 Mon Sep 17 00:00:00 2001 From: yuan <1551130722@qq.com> Date: Wed, 28 Feb 2018 17:14:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?dashboard=E5=A2=9E=E5=8A=A0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=94=AF=E4=BB=98=E9=99=90=E9=A2=9D=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/analysis/web/DashboardController.java | 14 ++++++++++++++ src/main/ui/static/dashboard/dashboard.js | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java b/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java index ec3eaccfa..575d8e6f3 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java @@ -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.organizations.core.OrgManager; import au.com.royalpay.payment.manage.permission.manager.ManagerMapping; +import au.com.royalpay.payment.tools.env.SysConfigManager; import au.com.royalpay.payment.tools.permission.enums.ManagerRole; import au.com.royalpay.payment.manage.permission.manager.RequirePartner; import au.com.royalpay.payment.tools.CommonConsts; @@ -24,6 +25,9 @@ public class DashboardController { @Resource private OrgManager orgManager; + @Resource + private SysConfigManager sysConfigManager; + @ManagerMapping("/common_analysis_1") public JSONObject commonAnalysis1(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { @@ -140,4 +144,14 @@ public class DashboardController { orgManager.checkOrg(manager,params); return dashboardService.getPlatformAmount(params); } + + @ManagerMapping(value = "/dashboard_base", method = RequestMethod.GET) + public JSONObject getDashBoardBaseConfig() { + JSONObject config = sysConfigManager.getSysConfig(); + JSONObject limits = new JSONObject(); + limits.put("payment.wechat.per_order_limit",config.getString("payment.wechat.per_order_limit")); + limits.put("payment.wechat.individual_daily_limit",config.getString("payment.wechat.individual_daily_limit")); + limits.put("payment.wechat.individual_yearly_limit",config.getString("payment.wechat.individual_yearly_limit")); + return limits; + } } diff --git a/src/main/ui/static/dashboard/dashboard.js b/src/main/ui/static/dashboard/dashboard.js index 1ed933040..e00797903 100644 --- a/src/main/ui/static/dashboard/dashboard.js +++ b/src/main/ui/static/dashboard/dashboard.js @@ -151,7 +151,7 @@ define(['angular', 'uiRouter', 'uiBootstrap', 'angularEcharts'], function (angul }); } function loadTradeLimite() { - $http.get('/sysconfig/base').then(function (resp) { + $http.get('/dashboard/system/dashboard_base').then(function (resp) { $scope.wechat_paymentconfig = resp.data; $scope.htmlTooltip = $sce.trustAsHtml('