master
liuxinxin 5 years ago
parent 801aab3d83
commit 79193155b2

@ -262,6 +262,8 @@ public interface ClientManager {
void uploadKycFiles(JSONObject manager, String clientMoniker, ClientKycFilesInfo filesInfo); void uploadKycFiles(JSONObject manager, String clientMoniker, ClientKycFilesInfo filesInfo);
List<JSONObject> uploadKycFilesForWaitCompliance(JSONObject manager, String clientMoniker, ClientKycFilesInfo filesInfo);
List<JSONObject> uploadAuthFilesForWaitCompliance(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo); List<JSONObject> uploadAuthFilesForWaitCompliance(JSONObject manager, String clientMoniker, ClientAuthFilesInfo filesInfo);
void commitAuthFilesToCompliance(String clientMoniker, JSONObject account, String source); void commitAuthFilesToCompliance(String clientMoniker, JSONObject account, String source);

@ -3560,6 +3560,27 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return fileResult; return fileResult;
} }
@Override
@Transactional
public List<JSONObject> uploadKycFilesForWaitCompliance(JSONObject manager, String clientMoniker, ClientKycFilesInfo filesInfo) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
List<JSONObject> fileResult = new ArrayList<>();
if (client == null) {
throw new InvalidShortIdException();
}
int clientId = client.getIntValue("client_id");
try {
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_BANK_FILE, filesInfo.getFile_bank_info(),fileResult);
updateSysClientFilesForWaitCompliance(manager, clientId, CLIENT_ID_FILE, filesInfo.getFile_id_info(),fileResult);
updateSysClientFilesForWaitCompliance(manager, clientId, KYC_UTILITY_BILL_FILE, filesInfo.getUtility_bill_info(),fileResult);
} catch (Exception e) {
logger.error("上传KYC文件失败", e);
throw new BadRequestException("上传KYC文件失败" + e.getMessage());
}
return fileResult;
}
@Override @Override
@Transactional @Transactional
public void commitAuthFilesToCompliance(String clientMoniker, JSONObject account, String source) { public void commitAuthFilesToCompliance(String clientMoniker, JSONObject account, String source) {

@ -2,6 +2,7 @@ package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException; import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.kyc.core.KycService; import au.com.royalpay.payment.manage.kyc.core.KycService;
import au.com.royalpay.payment.manage.mappers.system.ClientComplianceCompanyMapper;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo; import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientKycFilesInfo; import au.com.royalpay.payment.manage.merchants.beans.ClientKycFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo; import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
@ -60,6 +61,8 @@ public class PartnerViewController {
@Resource @Resource
private SignInAccountService signInAccountService; private SignInAccountService signInAccountService;
@Resource @Resource
private ClientComplianceCompanyMapper clientComplianceCompanyMapper;
@Resource
private KycService kycService; private KycService kycService;
@RequestMapping(method = RequestMethod.GET) @RequestMapping(method = RequestMethod.GET)
@ -588,6 +591,19 @@ public class PartnerViewController {
clientManager.uploadKycFiles(manager, account.getString("client_moniker"), filesInfo); clientManager.uploadKycFiles(manager, account.getString("client_moniker"), filesInfo);
} }
@PartnerMapping(value = "/update/wait_kyc_file", method = RequestMethod.PUT)
@ResponseBody
public void updateWaitKycFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientKycFilesInfo filesInfo) {
JSONObject KycFilesAuth = clientComplianceCompanyMapper.findKycFileComplete(account.getIntValue("client_id"));
if (KycFilesAuth == null) {
JSONObject manager = new JSONObject();
manager.put("display_name","client");
clientManager.uploadKycFilesForWaitCompliance(manager, account.getString("client_moniker"), filesInfo);
}else {
throw new BadRequestException("已通过审核,暂不能提交和修改");
}
}
@PartnerMapping(value = "/update/wait_compliance_file", method = RequestMethod.PUT) @PartnerMapping(value = "/update/wait_compliance_file", method = RequestMethod.PUT)
@ResponseBody @ResponseBody
public void updateWaitComplianceFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientAuthFilesInfo filesInfo) { public void updateWaitComplianceFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientAuthFilesInfo filesInfo) {
@ -602,7 +618,6 @@ public class PartnerViewController {
} }
} }
@PartnerMapping(value = "/clientCompliance/{clientMoniker}/viewCommit", method = RequestMethod.POST) @PartnerMapping(value = "/clientCompliance/{clientMoniker}/viewCommit", method = RequestMethod.POST)
@ResponseBody @ResponseBody
public void clientComplianceViewCommit(@PathVariable String clientMoniker ,@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody JSONObject photoInfo) { public void clientComplianceViewCommit(@PathVariable String clientMoniker ,@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody JSONObject photoInfo) {

@ -124,7 +124,7 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS
} }
$scope.updateFile = function () { $scope.updateFile = function () {
$http.put('/client/partner_info/update/kycFile', $scope.file).then(function () { $http.put('/client/partner_info/update/wait_kyc_file', $scope.file).then(function () {
commonDialog.alert({ commonDialog.alert({
title: 'Success', title: 'Success',
content: 'Upload Successful', content: 'Upload Successful',

Loading…
Cancel
Save