From 222edd4ba861e7152e3e557c11cf31de0f72288e Mon Sep 17 00:00:00 2001 From: luoyang Date: Mon, 25 Mar 2019 09:41:35 +0800 Subject: [PATCH] fix representative_id --- .../payment/manage/merchants/core/ClientManager.java | 4 ++-- .../manage/merchants/core/impls/ClientManagerImpl.java | 8 ++++---- .../manage/merchants/web/PartnerManageController.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index 5c2bd86e5..4e8151f6b 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -327,9 +327,9 @@ public interface ClientManager { String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply,JSONObject manager); - void registerAlipayGms(String clientMoniker, String representative_id, JSONObject manager); + void registerAlipayGms(String clientMoniker, JSONObject representative_id, JSONObject manager); - void registerAlipayOnlineGms(String clientMoniker, String representative_id, JSONObject manager); + void registerAlipayOnlineGms(String clientMoniker, JSONObject representative_id, JSONObject manager); String queryAlipayGmsStatus(String clientMoniker, JSONObject manager); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 71ed800b7..2196babf0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -3789,7 +3789,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } @Override - public void registerAlipayGms(String clientMoniker, String representative_id, JSONObject manager) { + public void registerAlipayGms(String clientMoniker, JSONObject representative_id, JSONObject manager) { JSONObject client = getClientInfoByMoniker(clientMoniker); if (client == null) { throw new InvalidShortIdException(); @@ -3805,7 +3805,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid client.put("bank_id", client_bank.getString("account_no")); if (!"Company".equals(client.getString("business_structure"))) { - if (representative_id == null || representative_id.isEmpty()) { + if (StringUtils.isBlank(representative_id.getString("representative_id"))) { throw new BadRequestException("ID or passport number can't be null"); } client.put("representative_id", representative_id); @@ -3843,7 +3843,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } @Override - public void registerAlipayOnlineGms(String clientMoniker, String representative_id, JSONObject manager) { + public void registerAlipayOnlineGms(String clientMoniker, JSONObject representative_id, JSONObject manager) { JSONObject client = getClientInfoByMoniker(clientMoniker); if (client == null) { throw new InvalidShortIdException(); @@ -3858,7 +3858,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } client.put("bank_id", client_bank.getString("account_no")); - if (representative_id == null || representative_id.isEmpty()) { + if (StringUtils.isBlank(representative_id.getString("representative_id"))) { throw new BadRequestException("ID or passport number can't be null"); } client.put("representative_id", representative_id); 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 58eb2a3e7..14065bb90 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 @@ -601,7 +601,7 @@ public class PartnerManageController { } @ManagerMapping(value = "/{clientMoniker}/register/alipay_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) - public void registerAlipayGms(@PathVariable String clientMoniker,@RequestBody String representative_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + public void registerAlipayGms(@PathVariable String clientMoniker,@RequestBody JSONObject representative_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { clientManager.registerAlipayGms(clientMoniker, representative_id, manager); } @@ -611,7 +611,7 @@ public class PartnerManageController { } @ManagerMapping(value = "/{clientMoniker}/register/alipayOnline_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) - public void registerAlipayOnlineGms(@PathVariable String clientMoniker,@RequestBody String representative_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + public void registerAlipayOnlineGms(@PathVariable String clientMoniker,@RequestBody JSONObject representative_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { clientManager.registerAlipayOnlineGms(clientMoniker, representative_id, manager); }