diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/core/AliforexcelService.java b/src/main/java/au/com/royalpay/payment/manage/dev/core/AliforexcelService.java index aab8939e8..63ac55f5f 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/core/AliforexcelService.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/core/AliforexcelService.java @@ -12,4 +12,6 @@ public interface AliforexcelService { JSONObject listClients(HttpServletResponse httpResponse, JSONObject manager, AliExcel query); JSONObject registerAlipayOnlineMerchant(); + + JSONObject getLessPartnerInfo(); } diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java index 6b6f57391..59acf4ed6 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java @@ -110,6 +110,7 @@ public class AliforexcelServiceImpl implements AliforexcelService { JSONObject exception = new JSONObject(); exception.put("client_moniker", client.getString("client_moniker")); exception.put("return_msg", e.getMessage()); + exception.put("bd_name", client.getString("bd_user_name")); lessInfoMerchant.add(exception); continue; } @@ -139,6 +140,30 @@ public class AliforexcelServiceImpl implements AliforexcelService { return result; } + @Override + public JSONObject getLessPartnerInfo() { + JSONObject result = new JSONObject(); + List lessInfoMerchant = new ArrayList<>(); + List useAlipayOnlineMerchant = transactionMapper.useAlipayOnlineClients(); + for (int clientId : useAlipayOnlineMerchant) { + JSONObject client = clientMapper.findClient(clientId); + if (client == null) { + continue; + } + try { + checkPartnerInfo(client); + } catch (InvalidParameterException e) { + JSONObject exception = new JSONObject(); + exception.put("client_moniker", client.getString("client_moniker")); + exception.put("return_msg", e.getMessage()); + exception.put("bd_name", client.getString("bd_user_name")); + lessInfoMerchant.add(exception); + } + } + result.put("less_info_merchant", lessInfoMerchant); + return result; + } + private void checkPartnerInfo(JSONObject client) { if (client == null) { throw new InvalidShortIdException(); 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 7b6b889d9..ceb3a28cd 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 @@ -454,4 +454,9 @@ public class TestController implements ApplicationEventPublisherAware { public JSONObject registerAlipayOnlineMerchant() { return aliforexcelService.registerAlipayOnlineMerchant(); } + + @ManagerMapping(value = "/register/getLessPartnerInfo", role = ManagerRole.DEVELOPER, method = RequestMethod.GET) + public JSONObject getLessPartnerInfo() { + return aliforexcelService.getLessPartnerInfo(); + } } diff --git a/src/main/ui/static/config/devtools/devtools.js b/src/main/ui/static/config/devtools/devtools.js index 871d99bc2..65576c7a1 100644 --- a/src/main/ui/static/config/devtools/devtools.js +++ b/src/main/ui/static/config/devtools/devtools.js @@ -424,6 +424,17 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) { }, function (resp) { alert(resp.data.message); }) + }; + + $scope.getLessPartnerInfo = function () { + $scope.totalhide = true; + $scope.selecttotal = false; + $http.get('/dev/register/getLessPartnerInfo').then(function (resp) { + $scope.totalhide = false; + $scope.selecttotal = true; + }, function (resp) { + alert(resp.data.message); + }) } }]); diff --git a/src/main/ui/static/config/devtools/templates/registerAlipayOnlineMerchant.html b/src/main/ui/static/config/devtools/templates/registerAlipayOnlineMerchant.html index 92c0db450..a59c7665e 100644 --- a/src/main/ui/static/config/devtools/templates/registerAlipayOnlineMerchant.html +++ b/src/main/ui/static/config/devtools/templates/registerAlipayOnlineMerchant.html @@ -10,7 +10,10 @@
- + +
+
+
需要报备的商户编码