fix 去掉representative_id

master
luoyang 6 years ago
parent 049e6705a3
commit aa2fea8f71

@ -13,7 +13,7 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.1.2</jib-maven-plugin.version> <jib-maven-plugin.version>1.1.2</jib-maven-plugin.version>
<docker-image.version>1.0.5</docker-image.version> <docker-image.version>1.0.6</docker-image.version>
</properties> </properties>
<dependencies> <dependencies>

@ -323,9 +323,9 @@ public interface ClientManager {
String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply,JSONObject manager); String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply,JSONObject manager);
void registerAlipayGms(String clientMoniker, JSONObject representative_id, JSONObject manager); void registerAlipayGms(String clientMoniker, JSONObject manager);
void registerAlipayOnlineGms(String clientMoniker, JSONObject representative_id, JSONObject manager); void registerAlipayOnlineGms(String clientMoniker, JSONObject manager);
String queryAlipayGmsStatus(String clientMoniker, JSONObject manager); String queryAlipayGmsStatus(String clientMoniker, JSONObject manager);

@ -3979,7 +3979,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
@Override @Override
public void registerAlipayGms(String clientMoniker, JSONObject representative_id, JSONObject manager) { public void registerAlipayGms(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) { if (client == null) {
throw new InvalidShortIdException(); throw new InvalidShortIdException();
@ -4002,13 +4002,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("Alipay Industry can't be null"); throw new BadRequestException("Alipay Industry can't be null");
} }
if (!"Company".equals(client.getString("business_structure"))) {
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.getString("representative_id"));
}
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayRetailMerchant(); AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayRetailMerchant();
Element resultElement = alipayClient.registerGmsPortal(mch.getPid(), client); Element resultElement = alipayClient.registerGmsPortal(mch.getPid(), client);
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) { if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {
@ -4117,7 +4110,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
@Override @Override
public void registerAlipayOnlineGms(String clientMoniker, JSONObject representative_id, JSONObject manager) { public void registerAlipayOnlineGms(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) { if (client == null) {
throw new InvalidShortIdException(); throw new InvalidShortIdException();
@ -4140,11 +4133,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
client.put("bank_id", client_bank.getString("account_no")); client.put("bank_id", client_bank.getString("account_no"));
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.getString("representative_id"));
AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant(); AlipayConfig.AlipayMerchant mch = AlipayEnvironment.getEnv().getAlipayOnlineMerchant();
Element resultElement = alipayClient.registerOnlineGmsPortal(mch.getPid(), client); Element resultElement = alipayClient.registerOnlineGmsPortal(mch.getPid(), client);
if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) { if (!StringUtils.equalsIgnoreCase("T", resultElement.elementText("is_success"))) {

@ -628,8 +628,8 @@ public class PartnerManageController {
} }
@ManagerMapping(value = "/{clientMoniker}/register/alipay_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) @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) { public void registerAlipayGms(@PathVariable String clientMoniker,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.registerAlipayGms(clientMoniker, representative_id, manager); clientManager.registerAlipayGms(clientMoniker, manager);
} }
@ManagerMapping(value = "/{clientMoniker}/query/alipay_gms", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) @ManagerMapping(value = "/{clientMoniker}/query/alipay_gms", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
@ -638,8 +638,8 @@ public class PartnerManageController {
} }
@ManagerMapping(value = "/{clientMoniker}/register/alipayOnline_gms", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) @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) { public void registerAlipayOnlineGms(@PathVariable String clientMoniker,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.registerAlipayOnlineGms(clientMoniker, representative_id, manager); clientManager.registerAlipayOnlineGms(clientMoniker, manager);
} }
@ManagerMapping(value = "/{clientMoniker}/query/alipayOnline_gms", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) @ManagerMapping(value = "/{clientMoniker}/query/alipayOnline_gms", method = RequestMethod.GET, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})

@ -1590,24 +1590,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
commonDialog.confirm({ commonDialog.confirm({
title: 'Warning', title: 'Warning',
content: '是否使用该商户的现有信息进件?', content: '是否使用该商户的现有信息进件?',
json:$scope.alipay_gms_json json: $scope.alipay_gms_json
}).then(function () { }).then(function () {
if ($scope.partner.business_structure === "Company") { $http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms').then(function () {
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms', {representative_id: ""}).then(function () {
commonDialog.alert({title: 'Success', content: 'Alipay进件成功', type: 'success'}); commonDialog.alert({title: 'Success', content: 'Alipay进件成功', type: 'success'});
}, function (resp) { }, function (resp) {
commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'}); commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'});
}) })
} else {
commonDialog.inputText({title: '请输入商户身份证或护照号码'}).then(function (text) {
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms', {representative_id: text}).then(function () {
commonDialog.alert({title: 'Success', content: '提示Alipay进件成功', type: 'success'});
}, function (resp) {
commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'});
})
}); });
}
})
}) })
}; };
$scope.queryAlipayGms = function () { $scope.queryAlipayGms = function () {
@ -1625,14 +1615,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
content: '是否使用该商户的现有信息进件?', content: '是否使用该商户的现有信息进件?',
json:$scope.alipayOnline_gms_json json:$scope.alipayOnline_gms_json
}).then(function () { }).then(function () {
commonDialog.inputText({title: '请输入商户身份证或护照号码'}).then(function (text) { $http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms').then(function () {
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms', {representative_id: text}).then(function () {
commonDialog.alert({title: 'Success', content: '提示AlipayOnline进件成功', type: 'success'}); commonDialog.alert({title: 'Success', content: '提示AlipayOnline进件成功', type: 'success'});
}, function (resp) { }, function (resp) {
commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'}); commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'});
})
}); });
}) })
}); });
}; };

Loading…
Cancel
Save