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 0a850eb3b..e9545ebe0 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 @@ -471,8 +471,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid client.put("enable_gateway_version2", partnerGatewaySign.getBooleanValue("is_valid")); client.put("gateway_sign", partnerGatewaySign); } - if (sysClientLegalPersonMapper.findRepresentativeInfo(client.getIntValue("client_id")) != null) { - client.put("representativeInfo", sysClientLegalPersonMapper.findRepresentativeInfo(client.getIntValue("client_id"))); + JSONObject representativeInfo = sysClientLegalPersonMapper.findRepresentativeInfo(client.getIntValue("client_id")); + if (representativeInfo != null) { + client.put("representativeInfo", representativeInfo); } return client; } @@ -777,7 +778,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid representativeInfo.put("postcode",partner.getString("registered_postcode")); representativeInfo.put("state",partner.getString("registered_state")); sysClientLegalPersonMapper.save(representativeInfo); - System.out.println("aaaa"); } catch (Exception e) { throw new BadRequestException("error.partner.valid.dumplicate_client_moniker"); } diff --git a/src/main/ui/static/analysis/risk_business.js b/src/main/ui/static/analysis/risk_business.js index c4dcfe1f2..4c415f4d0 100644 --- a/src/main/ui/static/analysis/risk_business.js +++ b/src/main/ui/static/analysis/risk_business.js @@ -811,7 +811,6 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'], var saveRiskBtn = document.getElementById('save-risk-btn'); var saveRiskBtnInnerHtmlBak = saveRiskBtn.innerHTML; saveRiskBtn.disabled = true; - debugger saveRiskBtn.innerHTML = " Processing"; $http.post('/risk/business/events', $scope.riskEvent).then(function (resp) { saveRiskBtn.innerHTML = saveRiskBtnInnerHtmlBak; diff --git a/src/main/ui/static/payment/partner/partner.js b/src/main/ui/static/payment/partner/partner.js index c6527daa2..6ab7a3617 100644 --- a/src/main/ui/static/payment/partner/partner.js +++ b/src/main/ui/static/payment/partner/partner.js @@ -76,12 +76,18 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo controller: 'clientDeviceCtrl' }) }]); - app.controller('clientPartnerDetailCtrl', ['$scope', '$http', 'partner', 'industryMap', 'businessStructuresMap', 'commonDialog', 'Upload', '$state', function ($scope, $http, partner, industryMap, businessStructuresMap, commonDialog, Upload, $state) { + app.controller('clientPartnerDetailCtrl', ['$scope', '$http', 'stateMap', 'partner', 'industryMap', 'businessStructuresMap', 'commonDialog', 'Upload', '$state', function ($scope, $http, stateMap, partner, industryMap, businessStructuresMap, commonDialog, Upload, $state) { $scope.business_structures = businessStructuresMap.configs(); $scope.industries = industryMap.configs(); $scope.partner = partner.data; - $scope.partner.partner_type = $scope.partner.company_website ? 'website' : 'photo'; + $scope.states = stateMap.configs(); + $scope.partner.sameAsContactPerson = false; + $scope.partner.sameAsAddress = false; + $scope.partner.partner_type = $scope.partner.company_website ? 'website' : 'photo'; + if ($scope.partner.representativeInfo) { + $scope.partner.representativeInfo.phone = $scope.partner.representativeInfo.phone.substring(1, $scope.partner.contact_phone.length); + } $scope.getMerchantLocation = function () { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/location').then(function (resp) { $scope.merchant_location = resp.data; @@ -89,6 +95,27 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo }; $scope.getMerchantLocation(); + $scope.checkboxOnclick = function () { + $scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson); + if ($scope.partner.sameAsContactPerson) { + $scope.partner.representativeInfo.representative_person = $scope.partner.contact_person; + $scope.partner.representativeInfo.phone = $scope.partner.contact_phone.substring(1, $scope.partner.contact_phone.length); + $scope.partner.representativeInfo.email = $scope.partner.contact_email; + $scope.partner.representativeInfo.job_title = $scope.partner.contact_job; + } + }; + + $scope.sameAddress = function (){ + $scope.partner.sameAsAddress = !($scope.partner.sameAsAddress); + if($scope.partner.sameAsAddress){ + $scope.partner.representativeInfo.address = $scope.partner.address; + $scope.partner.representativeInfo.suburb = $scope.partner.suburb; + $scope.partner.representativeInfo.postcode = $scope.partner.postcode; + $scope.partner.representativeInfo.state = $scope.partner.state; + } + } + + $scope.uploadLogo = function (file) { if (file != null) { if (file.size > 1 * 1024 * 1024) { @@ -217,7 +244,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo alert("Logo is necessary!"); return; } - if ($scope.partner.partner_type == 'photo') { + if ($scope.partner.client_pay_type.indexOf('2') >= 0) { if (!$scope.partner.company_photo) { alert('Shop Photo1 is necessary'); return; @@ -230,11 +257,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo var content = ''; if ($scope.partner.client_pay_type.length == 0) { - alert('请选择商户支付场景') + alert('请选择商户支付场景'); return; } if ($scope.partner.client_pay_desc.length == 0) { - alert('请选择商户支付方式') + alert('请选择商户支付方式'); return; } if ($scope.partner.client_pay_type.indexOf('1') >= 0) { @@ -257,6 +284,14 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo } $scope.partner.client_pay_type = $scope.partner.client_pay_type.join(','); $scope.partner.client_pay_desc = $scope.partner.client_pay_desc.join(','); + $scope.partner.legal_representative_person = $scope.partner.representativeInfo.representative_person; + $scope.partner.legal_representative_phone = '+' + $scope.partner.representativeInfo.phone; + $scope.partner.legal_representative_email = $scope.partner.representativeInfo.email; + $scope.partner.legal_representative_job = $scope.partner.representativeInfo.job_title; + $scope.partner.registered_address = $scope.partner.representativeInfo.address; + $scope.partner.registered_suburb = $scope.partner.representativeInfo.suburb; + $scope.partner.registered_postcode = $scope.partner.representativeInfo.postcode; + $scope.partner.registered_state = $scope.partner.representativeInfo.state; $http.put('/client/partner_info/update/partnerInfo', $scope.partner).then(function () { if (content != '') { commonDialog.alert({ @@ -273,6 +308,8 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo } $state.go('basic', {clientMoniker: $scope.partner.client_moniker}, {reload: true}); }, function (resp) { + $scope.partner.client_pay_type = $scope.partner.client_pay_type.split(","); + $scope.partner.client_pay_desc = $scope.partner.client_pay_desc.split(","); commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) }); }; @@ -328,8 +365,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo $scope.states = stateMap.configs(); $scope.countries = countryMap.configs(); - if($scope.partner.representativeInfo != null) - { + if($scope.partner.representativeInfo != null) { $scope.partner.registered_address = $scope.partner.representativeInfo.address; $scope.partner.registered_suburb = $scope.partner.representativeInfo.suburb; $scope.partner.registered_postcode = $scope.partner.representativeInfo.postcode; @@ -459,14 +495,10 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo $scope.partner.sameAsContactPerson = false; $scope.checkboxOnclick = function (){ $scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson); - if($scope.partner.sameAsContactPerson) - { + if($scope.partner.sameAsContactPerson) { $scope.partner.legal_representative_person = $scope.partner.contact_person; - $scope.partner.legal_representative_phone = $scope.partner.contact_phone; - $scope.partner.legal_representative_email = $scope.partner.contact_email; - $scope.partner.legal_representative_job = $scope.partner.contact_job; } }; @@ -474,14 +506,10 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo $scope.partner.sameAsAddress=false; $scope.sameAddress = function (){ $scope.partner.sameAsAddress=!($scope.partner.sameAsAddress); - if($scope.partner.sameAsAddress) - { + if($scope.partner.sameAsAddress) { $scope.partner.registered_address = $scope.partner.address; - $scope.partner.registered_suburb = $scope.partner.suburb; - $scope.partner.registered_postcode = $scope.partner.postcode; - $scope.partner.registered_state = $scope.partner.state; } }; @@ -500,7 +528,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo alert("Logo is necessary!"); return; } - if ($scope.partner.partner_type == 'photo') { + if ($scope.partner.client_pay_type.indexOf('2') >= 0) { if (!$scope.partner.company_photo) { alert('Shop Photo1 is necessary'); return; @@ -556,6 +584,8 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo } $state.go('basic', {reload: true}); }, function (resp) { + $scope.partner.client_pay_type = $scope.partner.client_pay_type.split(","); + $scope.partner.client_pay_desc = $scope.partner.client_pay_desc.split(","); commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) }); }; diff --git a/src/main/ui/static/payment/partner/templates/client_partner_detail.html b/src/main/ui/static/payment/partner/templates/client_partner_detail.html index 853c1fb36..dbbcd61c1 100644 --- a/src/main/ui/static/payment/partner/templates/client_partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/client_partner_detail.html @@ -135,34 +135,6 @@
- -If the partner is a offline shop then a photo of - shop - is - required while an online store shall choose company website
-- 只要有可能产生线下交易(商户静态码、POS),就必须上传照片,否则支付宝会禁止交易
-Required Field
-Required Field
-Less Than 200 - Characters(including symbols and spaces)
-Required Field
+Less Than 200 + Characters(including symbols and spaces)
+If the partner is a offline shop then a photo of + shop + is + required while an online store shall choose company website
++ 只要有可能产生线下交易(商户静态码、POS),就必须上传照片,否则支付宝会禁止交易
++ +
+Required + Field
+Less Than 50 + Characters(including symbols and spaces)
+Required + Field
+Less + Than 50 + Characters(including symbols and spaces)
+Required + Field
+Less + Than 20 Characters
+Required + Field
+Less Than 50 + Characters(including symbols and spaces)
+Required + Field
+Less Than 50 + Characters(including symbols and spaces)
+Less + Than 200 + Characters(including symbols and spaces)
+Required + Field
+Less + Than 50 + Characters(including symbols and spaces)
+Required + Field
+Less + Than 10 + Characters(including symbols and spaces)
+Required + Field
+Required + Field
+If the partner is a offline shop then a photo of shop is - required while an online store shall choose company website
-- 只要有可能产生线下交易(商户静态码、POS),就必须上传照片,否则支付宝会禁止交易
-Required Field
-Required Field
-Less Than 200 - Characters(including symbols and spaces)
-Required Field
+Less Than 200 + Characters(including symbols and spaces)
+