master
yuan 7 years ago
parent 24f3e1f356
commit f4da89ddcd

@ -292,4 +292,6 @@ public interface ClientManager {
List<JSONObject> getClientSubMerchantIdLogs(String clientMoniker,JSONObject manager);
void applyToCompliance(String client_moniker, JSONObject account);
void sendVerifyEmail(JSONObject client,String accountId);
}

@ -11,6 +11,7 @@ import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver;
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.device.core.DeviceManager;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper;
import au.com.royalpay.payment.manage.mappers.log.ClientsOperationLogMapper;
@ -264,6 +265,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private ClientInfoCacheSupport clientInfoCacheSupport;
@Resource
private SimpleClientApplyService simpleClientApplyService;
@Resource
private MongoTemplate mongoTemplate;
@Resource
@ -3439,4 +3443,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
sendCommissionWechatMessage(client);
}
}
@Override
public void sendVerifyEmail(JSONObject client,String accountId) {
JSONObject clientAccount = clientAccountMapper.findByOpenId(accountId);
simpleClientApplyService.sendVerifyEmail(client.getString("contact_email"),client.getIntValue("client_id"),clientAccount.getString("username"));
}
}

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.merchants.core.ClientSignEventSupport;
@ -57,6 +58,9 @@ public class PartnerViewController {
@Resource
private ClientContractService clientContractService;
@Resource
private SimpleClientApplyService simpleClientApplyService;
@RequestMapping(method = RequestMethod.GET)
@RequirePartner
@ResponseBody
@ -385,4 +389,16 @@ public class PartnerViewController {
public void commitAudit(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.applyToCompliance(account.getString("client_moniker"),account);
}
@PartnerMapping(value = "/compliance/files", method = RequestMethod.GET)
@ResponseBody
public JSONObject complianceFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
return clientManager.getAuthFiles(null,account.getString("client_moniker"));
}
@PartnerMapping(value = "/verify/email", method = RequestMethod.PUT)
@ResponseBody
public void sendVerifyEmail(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.sendVerifyEmail(account.getJSONObject("client"),account.getString("account_id"));
}
}

@ -914,6 +914,22 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
$scope.getClearingTransactions = function (client_id, detailId) {
clearingDetailService.clientClearingDetail(client_id, detailId, true)
};
$scope.checkStartGuidance = function () {
$http.get('/client/partner_info/compliance/file').then(function (resp) {
$scope.complianceFiles = resp.data;
if( $scope.complianceFiles.file_bank_info != null && $scope.complianceFiles.file_company_info != null){
if($scope.complianceFiles.file_id_info != null && $scope.complianceFiles.file_agreement_info != null && $scope.complianceFiles.file_apply_info != null){
$scope.toCommitFiles = false;
}
}
});
};
$scope.checkStartGuidance();
$scope.checkEmail = function () {
$http.put('/client/partner_info/verify/email').then(function (resp) {
$scope.manual_settle = resp.data.manual_settle;
})
}
}]);
app.controller('exchangeRateHistoryDialogCtrl', ['$scope', '$http', '$filter', 'chartParser', function ($scope, $http, $filter, chartParser) {

@ -180,8 +180,26 @@
.mini-stat-info span{
font-size: 18px;
}
</style>
.start_item{
line-height: 50px;
}
.start_ico{
display: inline-block;
line-height: 50px;
font-size: 30px;
vertical-align: middle;
color: #6fd088;
}
.start_text{
line-height: 50px;
display: inline-block;
vertical-align: baseline;
}
.start_email{
font-size: 15px;
}
</style>
<section class="content-header">
<h1>
Dashboard
@ -201,6 +219,71 @@
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><em>Tips:</em> Started with RoyalPay</h3>
</div>
<div class="panel-body">
<div class="start_item col-sm-6 col-xs-12">
<div class="start_ico">
<i class="fa fa-check-circle"></i>
</div>
<div class="start_text">
<p><a href="" class="text-primary" role="button" title="Send"
ng-click="checkEmail()">
<span class="text-info">&nbsp;验证邮箱 <em>{{partner.contact_email}}</em></span>
<i class="fa fa-paper-plane-o"></i>
</a>
</p>
</div>
</div>
<div class="start_item col-sm-6 col-xs-12">
<div class="start_ico">
<i class="fa fa-dot-circle-o"></i>
</div>
<div class="start_text">
<p>&nbsp;
<a href="" class="text-primary" ui-sref="basic.payment_info_edit">
完善商户信息
</a>
</p>
</div>
</div>
<div class="start_item col-sm-6 col-xs-12" ng-if="toCommitFiles">
<div class="start_ico">
<i class="fa fa-dot-circle-o"></i>
</div>
<div class="start_text">
<p>&nbsp;
<a href="" class="text-primary" ui-sref="basic.compliance_files">
提交合规材料
</a>
</p>
</div>
</div>
<div class="start_item col-sm-6 col-xs-12">
<div class="start_ico">
<i class="fa fa-file-pdf-o"></i>
</div>
<div class="start_text">
<p>&nbsp;
<a href="https://www.royalpay.com.au/downloads/royalpay_user_guide.pdf"
target="_blank" class="text-primary">
查看《用户手册》
</a>
</p>
</div>
</div>
<div class="col-sm-12">
<small style="color: grey">在账户完成认证审核之前,所有进行的交易不会进行清算,若有疑问,请联系我们的<a href="">客服!</a></small>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="mini-stat clearfix bg-white">

@ -15,10 +15,23 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
return $http.get('/client/partner_info');
}]
}
}).state('basic.payment_info_edit', {
url: '/payment/edit',
templateUrl: '/static/payment/partner/templates/client_partner_edit.html',
controller: 'clientPaymentInfoEditCtrl'
}).state('basic.payment_info', {
url: '/payment',
templateUrl: '/static/payment/partner/templates/client_payment_info.html',
controller: 'clientPaymentInfoCtrl'
}).state('basic.compliance_files', {
url: '/{client_moniker}/compliance_files',
templateUrl: '/static/payment/partner/templates/client_compliance_files.html',
controller: 'clientComplianceFilesCtrl',
resolve: {
file: ['$http', function ($http) {
return $http.get('/client/partner_info/compliance/file');
}]
}
}).state('payment_materials', {
url: '/payment_materials',
templateUrl: '/static/payment/partner/templates/client_payment_materials.html',
@ -55,6 +68,216 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
);
}
}]);
app.controller('clientPaymentInfoEditCtrl', ['$scope', '$http', 'partner','industryMap', function ($scope, $http, partner,industryMap) {
}]);
app.controller('clientComplianceFilesCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file) {
$scope.file = file.data || {};
//audit files
$scope.uploadBankFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.bankFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.bankFileProgress;
$scope.file.file_bank_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
} else {
$scope.bankIsImage = true;
}
}, function (resp) {
delete $scope.bankFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.bankFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.agreeIsImage = true;
if ($scope.file.file_agreement_info && $scope.file.file_agreement_info.endsWith('pdf')) {
$scope.agreeIsImage = false;
}
$scope.bankIsImage = true;
if ($scope.file.file_bank_info && $scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
}
$scope.companyIsImage = true;
if ($scope.file.file_company_info && $scope.file.file_company_info.endsWith('pdf')) {
$scope.companyIsImage = false;
}
$scope.applyIsImage = true;
if ($scope.file.file_apply_info && $scope.file.file_apply_info.endsWith('pdf')) {
$scope.applyIsImage = false;
}
$scope.idIsImage = true;
if ($scope.file.file_id_info && $scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
}
$scope.uploadCompanyFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.companyFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.companyFileProgress;
$scope.file.file_company_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_company_info.endsWith('pdf')) {
$scope.companyIsImage = false;
} else {
$scope.companyIsImage = true;
}
}, function (resp) {
delete $scope.companyFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.companyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
//上传ID信息
$scope.uploadIDFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.idFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.idFileProgress;
$scope.file.file_id_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
} else {
$scope.idIsImage = true;
}
}, function (resp) {
delete $scope.idFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.idFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
//上传协议文件
$scope.uploadAgreementFile = function (file) {
if (file != null) {
if (file.size > 10 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过5MB请压缩后重试', type: 'error'})
} else {
$scope.agreementFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.agreementFileProgress;
$scope.file.file_agreement_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_agreement_info.endsWith('pdf')) {
$scope.agreeIsImage = false;
} else {
$scope.agreeIsImage = true;
}
}, function (resp) {
delete $scope.agreementFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.agreementFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
//上传申请表
$scope.uploadApplyFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.applyFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.applyFileProgress;
$scope.file.file_apply_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_apply_info.endsWith('pdf')) {
$scope.applyIsImage = false;
} else {
$scope.applyIsImage = true;
}
}, function (resp) {
delete $scope.applyFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.applyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
/* $scope.downloadAsZip = function () {
var url = '/sys/partners/' + $scope.partner.client_moniker + '/download/complianceAsZIP';
return url;
};
*/
$scope.updateFile = function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/file', $scope.file).then(function () {
commonDialog.alert({
title: 'Success',
content: 'Upload Successful',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
};
function commitError() {
commonDialog.alert({
title: 'Error',
content: 'Missing file',
type: 'error'
});
};
$scope.commitPartner = function () {
if ($scope.file) {
if ($scope.file.file_bank_info != null && $scope.file.file_company_info != null && $scope.file.file_id_info != null && $scope.file_apply_info != null) {
$http.put('/client/partner_info/compliance_audit').then(function (resp) {
});
} else {
commitError();
}
} else {
commitError();
}
};
}]);
app.controller('clientPaymentInfoCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) {
$scope.paymentInfo = $scope.partner;
$scope.old_customer_surcharge_rate = angular.copy($scope.partner.customer_surcharge_rate);

@ -22,6 +22,10 @@
<li ui-sref-active="active">
<a ui-sref=".clearing_config">Clearing Config</a>
</li>
<li ui-sref-active="active">
<a ui-sref=".compliance_files">Compliance files</a>
</li>
</ul>
<div class="tab-content" ui-view>

Loading…
Cancel
Save