商户资料

master
liuxinxin 5 years ago
parent eec19b4d3f
commit 29b4ca0703

@ -16,4 +16,6 @@ public interface ClientComplianceApply {
void passComplianceFile(JSONObject manager,int clientId,JSONObject passInfo); void passComplianceFile(JSONObject manager,int clientId,JSONObject passInfo);
void refuseComplianceFile(JSONObject manager,int clientId,JSONObject refuseInfo);
} }

@ -86,5 +86,23 @@ public class ClientComplianceApplyImpl implements ClientComplianceApply
complianceDetail.put("operator_id", manager.getString("manager_id")); complianceDetail.put("operator_id", manager.getString("manager_id"));
complianceDetail.put("status",1); complianceDetail.put("status",1);
clientComplianceCompanyMapper.update(complianceDetail); clientComplianceCompanyMapper.update(complianceDetail);
clientFilesMapper.passCompliance(clientId);
}
@Override
public void refuseComplianceFile(JSONObject manager, int clientId, JSONObject refuseInfo) {
JSONObject complianceDetail = clientComplianceCompanyMapper.findFileByClientId(clientId);
if (complianceDetail == null) {
throw new BadRequestException("无此记录");
}
if (complianceDetail.getIntValue("status") == 2) {
throw new BadRequestException("已打回,请避免重复操作");
}
complianceDetail.put("description",refuseInfo.getString("description"));
complianceDetail.put("operator_id", manager.getString("manager_id"));
complianceDetail.put("status",2);
clientComplianceCompanyMapper.update(complianceDetail);
clientFilesMapper.refuseCompliance(clientId);
} }
} }

@ -2,6 +2,7 @@ package au.com.royalpay.payment.manage.complianceAudit.web;
import au.com.royalpay.payment.manage.complianceAudit.bean.ClientComplianceQuery; import au.com.royalpay.payment.manage.complianceAudit.bean.ClientComplianceQuery;
import au.com.royalpay.payment.manage.complianceAudit.core.ClientComplianceApply; import au.com.royalpay.payment.manage.complianceAudit.core.ClientComplianceApply;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping; import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.permission.manager.RequireManager; import au.com.royalpay.payment.manage.permission.manager.RequireManager;
@ -23,6 +24,8 @@ public class ComplianceAuditController
private ClientComplianceApply clientComplianceApply; private ClientComplianceApply clientComplianceApply;
@Resource @Resource
private ClientManager clientManager; private ClientManager clientManager;
@Resource
private ClientMapper clientMapper;
@RequestMapping(value = "/listClientCompliances",method = RequestMethod.GET) @RequestMapping(value = "/listClientCompliances",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT}) @RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
@ -31,22 +34,20 @@ public class ComplianceAuditController
} }
@ManagerMapping(value = "/{clientId}/pass/complianceFile", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER}) @ManagerMapping(value = "/{clientId}/pass/complianceFile", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void addUploadPaymentLogo(@PathVariable int clientId, @RequestBody JSONObject passInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public void passComplianceAudit(@PathVariable int clientId, @RequestBody JSONObject passInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientComplianceApply.passComplianceFile(manager,clientId,passInfo); clientComplianceApply.passComplianceFile(manager,clientId,passInfo);
} }
@RequestMapping(value = "/refuse/complianceFiles",method = RequestMethod.GET) @ManagerMapping(value = "/{clientId}/refuse/complianceFile", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT}) public void refuseComplianceAudit(@PathVariable int clientId, @RequestBody JSONObject refuseInfo, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
public void refuseCompliances(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, JSONObject refuseInfo) { clientComplianceApply.refuseComplianceFile(manager,clientId,refuseInfo);
// clientComplianceApply.passComplianceFiles(manager,refuseInfo);
} }
@RequestMapping(value = "/compliance/clientViewFiles/{client_id}",method = RequestMethod.GET) @RequestMapping(value = "/compliance/clientViewFiles/{clientMoniker}",method = RequestMethod.GET)
@RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT}) @RequireManager(role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.OPERATOR, ManagerRole.SERVANT})
public JSONObject searchCompliances(@PathVariable int client_id) { public JSONObject searchCompliances(@PathVariable String clientMoniker) {
JSONObject clientId = new JSONObject(); JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
clientId.put("client_id",client_id); return clientManager.getComplianceFilesForBD(client);
return clientManager.getComplianceFilesForBD(clientId);
} }
} }

@ -42,4 +42,8 @@ public interface ClientFilesMapper {
void confirmAgreeFile(@Param("client_id") int client_id); void confirmAgreeFile(@Param("client_id") int client_id);
void updateBeforeCompliance(@Param("client_id") int client_id); void updateBeforeCompliance(@Param("client_id") int client_id);
void refuseCompliance(@Param("client_id") int client_id);
void passCompliance(@Param("client_id") int client_id);
} }

@ -28,4 +28,12 @@
and (status = 0 or status = 3) and (status = 0 or status = 3)
</update> </update>
<update id="refuseCompliance">
update sys_files set `status` = 3 where client_id = #{client_id} and is_valid = 1 and status = 2
</update>
<update id="passCompliance">
update sys_files set `status` = 1 where client_id = #{client_id} and is_valid = 1 and status = 2
</update>
</mapper> </mapper>

@ -6,13 +6,13 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
url: '/partners/complianceForClient', url: '/partners/complianceForClient',
templateUrl: 'static/sys/templates/partner_compliance_for_client.html', templateUrl: 'static/sys/templates/partner_compliance_for_client.html',
controller: 'compliancePartnerForClientCtrl' controller: 'compliancePartnerForClientCtrl'
}).state('partner_apply.compliance_detail', { }).state('compliance_detail', {
url: '/{client_moniker}/compliance_detail', url: '/{client_moniker}/compliance_detail',
templateUrl: '/static/payment/partner/templates/client_compliance_to_auth.html', templateUrl: '/static/payment/partner/templates/client_compliance_to_auth.html',
controller: 'partnerComplianceCompanyDetail', controller: 'partnerComplianceCompanyDetail',
resolve: { resolve: {
file: ['$http','$stateParams',function ($http, $stateParams) { file: ['$http','$stateParams',function ($http, $stateParams) {
return $http.get('/compliance/audit/compliance/clientViewFiles/'+ $stateParams.client_id); return $http.get('/compliance/audit/compliance/clientViewFiles/'+ $stateParams.client_moniker);
}] }]
} }
}) })
@ -39,10 +39,17 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
app.controller('partnerComplianceCompanyDetail', ['$rootScope', '$scope', '$http', '$state', '$uibModal', 'commonDialog', 'file', function ($rootScope, $scope, $http, $state, $uibModal, commonDialog, file) { app.controller('partnerComplianceCompanyDetail', ['$rootScope', '$scope', '$http', '$state', '$uibModal', 'commonDialog', 'file', function ($rootScope, $scope, $http, $state, $uibModal, commonDialog, file) {
$scope.file = file.data || {}; $scope.file = file.data || {};
/*未完成*/
$scope.passPartnerComplianceFiles = function () { $scope.passPartnerComplianceFiles = function () {
$http.put('/compliance/audit/pass/complianceFiles' + $scope.account.account_id, $scope.account).then(function (resp) { $http.put('/compliance/audit/'+$scope.file.client.client_id+'/pass/complianceFile',{}).then(function (resp) {
$scope.$close(); $scope.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
}
$scope.refusePartnerComplianceFiles = function () {
$http.put('/compliance/audit/'+$scope.file.client.client_id+'/refuse/complianceFile',{}).then(function (resp) {
$scope.reload();
}, function (resp) { }, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
}) })

@ -6,12 +6,15 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp; <div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp;
<button class="btn-group btn btn-warning" type="button" <button class="btn-group btn btn-warning" type="button"
ng-click="passPartnerComplianceFiles()" >PASS ng-click="passPartnerComplianceFiles()" ng-if="file.file_company.status !=1 && file.file_company.status !=2" >PASS
</button> </button>
<button class="btn btn-danger" type="button" <button class="btn btn-danger" type="button"
ng-click="">REFUSE ng-click="refusePartnerComplianceFiles()" ng-if="file.file_company.status !=1 && file.file_company.status !=2">REFUSE
</button>
<button class="btn-group btn btn-warning" type="button" ng-if="file.file_company.status == 1" >Already Passed
</button>
<button class="btn btn-danger" type="button" ng-if=" file.file_company.status == 2">Already Refused
</button> </button>
</p>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="form-horizontal"> <div class="form-horizontal">

@ -75,7 +75,7 @@
</td> </td>
<td ng-bind="compliance_company.submit_time|date:'dd/MMM/yyyy'"></td> <td ng-bind="compliance_company.submit_time|date:'dd/MMM/yyyy'"></td>
<td><a class="text-primary" role="button" title="Detail" <td><a class="text-primary" role="button" title="Detail"
ui-sref="compliance_company.apply.compliance_detail({client_moniker:compliance_company.client_moniker})"> ui-sref="compliance_detail({client_moniker:compliance_company.client_moniker})">
<i class="fa fa-search"></i> Detail <i class="fa fa-search"></i> Detail
</a></td> </a></td>
<!--({client_id:compliance_company.client_id})--> <!--({client_id:compliance_company.client_id})-->

Loading…
Cancel
Save