fix representative_id

master
luoyang 6 years ago
parent c6d46a8b8f
commit 26487813fc

@ -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);

@ -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);

@ -602,7 +602,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 JSONObject representative_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.registerAlipayGms(clientMoniker, representative_id.getString("representative_id"), manager);
clientManager.registerAlipayGms(clientMoniker, representative_id, manager);
}
@ManagerMapping(value = "/{clientMoniker}/query/alipay_gms", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
@ -612,7 +612,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 JSONObject representative_id,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.registerAlipayOnlineGms(clientMoniker, representative_id.getString("representative_id"), manager);
clientManager.registerAlipayOnlineGms(clientMoniker, representative_id, manager);
}
@ManagerMapping(value = "/{clientMoniker}/query/alipayOnline_gms", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})

Loading…
Cancel
Save