From edf02f8c23b3ce7524b8841379e47735a4f7296a Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Tue, 24 Apr 2018 11:44:35 +0800 Subject: [PATCH] update --- .../payment/manage/dev/web/TestController.java | 10 ++++++---- src/main/ui/static/config/devtools/devtools.js | 3 +-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java index c82f44858..a1bf5ee10 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java @@ -393,13 +393,15 @@ public class TestController implements ApplicationEventPublisherAware { return PageListUtils.buildPageListResult(commonSubMerchantIdMapper.list(is_valid,sub_merchant_id,new PageBounds(page,limit))); } - @RequestMapping(value = "/common_sub_merchant_id", method = RequestMethod.POST) - public void addCommonSubMerchantId(@RequestBody JSONObject sub_merchant_id) { - commonSubMerchantIdService.save(sub_merchant_id.getJSONObject("params")); + @RequestMapping(value = "/common_sub_merchant_id/{sub_merchant_id}", method = RequestMethod.POST) + public void addCommonSubMerchantId(@PathVariable String sub_merchant_id) { + JSONObject record = new JSONObject(); + record.put("sub_merchant_id",sub_merchant_id); + commonSubMerchantIdService.save(record); } @RequestMapping(value = "/common_sub_merchant_id/{sub_merchant_id}", method = RequestMethod.PUT) - public void addCommonSubMerchantId(@PathVariable String sub_merchant_id) { + public void disableCommonSubMerchantId(@PathVariable String sub_merchant_id) { commonSubMerchantIdService.disable(sub_merchant_id); } } diff --git a/src/main/ui/static/config/devtools/devtools.js b/src/main/ui/static/config/devtools/devtools.js index 823028494..835080ed5 100644 --- a/src/main/ui/static/config/devtools/devtools.js +++ b/src/main/ui/static/config/devtools/devtools.js @@ -345,9 +345,8 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) { $scope.params = {}; $scope.saveSubMerchantId = function () { var params = angular.copy($scope.params); - $http.post('/dev/common_sub_merchant_id',{params: params}).then(function (resp) { + $http.post('/dev/common_sub_merchant_id/'+params.sub_merchant_id).then(function (resp) { alert("保存成功"); - $scope.loadSubMerchantId(1); },function (resp) { alert(resp.data.message); });