From c77007dada059f9cc3e0c5512fdb6e421eb7927b Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 5 Sep 2019 09:45:42 +0800 Subject: [PATCH] fix result string --- .../merchants/web/PartnerManageController.java | 12 ++++++++---- src/main/ui/static/payment/partner/partner-manage.js | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java index aa7bc54d2..6afc46321 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java @@ -682,8 +682,10 @@ public class PartnerManageController { } @ManagerMapping(value = "/{clientMoniker}/query/alipay_gms", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) - public String queryAlipayGmsStatus(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { - return clientManager.queryAlipayGmsStatus(clientMoniker, manager); + public JSONObject queryAlipayGmsStatus(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + JSONObject result = new JSONObject(); + result.put("result_status", clientManager.queryAlipayGmsStatus(clientMoniker, manager)); + return result; } @ManagerMapping(value = "/{clientMoniker}/register/alipayOnline_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) @@ -692,8 +694,10 @@ public class PartnerManageController { } @ManagerMapping(value = "/{clientMoniker}/query/alipayOnline_gms", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) - public String queryAlipayOnlineGmsStatus(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { - return clientManager.queryAlipayOnlineGmsStatus(clientMoniker, manager); + public JSONObject queryAlipayOnlineGmsStatus(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + JSONObject result = new JSONObject(); + result.put("result_status", clientManager.queryAlipayOnlineGmsStatus(clientMoniker, manager)); + return result; } @ManagerMapping(value = "/{clientMoniker}/query/alipay_gms_json", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 702d03297..23701c7e8 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -1908,7 +1908,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.queryAlipayGms = function () { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_gms').then(function (resp) { - commonDialog.alert({title: 'Success', content: resp.data, type: 'success'}); + commonDialog.alert({title: 'Success', content: resp.data.result_status, type: 'success'}); }, function (resp) { commonDialog.alert({title: 'Error', content: "查询失败:" + resp.data.message, type: 'error'}); }) @@ -1931,7 +1931,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.queryAlipayOnlineGms = function () { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipayOnline_gms').then(function (resp) { - commonDialog.alert({title: 'Success', content: resp.data, type: 'success'}); + commonDialog.alert({title: 'Success', content: resp.data.result_status, type: 'success'}); }, function (resp) { commonDialog.alert({title: 'Error', content: "查询失败:" + resp.data.message, type: 'error'}); })