|
|
|
@ -4,6 +4,7 @@ package au.com.royalpay.payment.manage.complianceAudit.core.impl;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
|
|
|
|
import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
|
|
|
|
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.kyc.enums.FilesAuthEnum;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientComplianceCompanyMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientComplianceCompanyMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientFilesMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientFilesMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
@ -122,7 +123,10 @@ public class ClientComplianceApplyImpl implements ClientComplianceApply
|
|
|
|
complianceDetail.put("status",1);
|
|
|
|
complianceDetail.put("status",1);
|
|
|
|
complianceDetail.put("description",' ');
|
|
|
|
complianceDetail.put("description",' ');
|
|
|
|
clientComplianceCompanyMapper.update(complianceDetail);
|
|
|
|
clientComplianceCompanyMapper.update(complianceDetail);
|
|
|
|
clientFilesMapper.passCompliance(clientId);
|
|
|
|
clientFilesMapper.updateFilesAuthStatus(clientId,
|
|
|
|
|
|
|
|
FilesAuthEnum.PASS_OPR.getAfterStatus(),
|
|
|
|
|
|
|
|
FilesAuthEnum.PASS_OPR.getBeforeStatus(),
|
|
|
|
|
|
|
|
FilesAuthEnum.PASS_OPR.getAuthType("compliance"));
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject client = clientManager.getClientInfo(clientId);
|
|
|
|
JSONObject client = clientManager.getClientInfo(clientId);
|
|
|
|
boolean clientChanged = false;
|
|
|
|
boolean clientChanged = false;
|
|
|
|
@ -143,6 +147,25 @@ public class ClientComplianceApplyImpl implements ClientComplianceApply
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void passKycFile(JSONObject manager, int clientId, JSONObject passInfo) {
|
|
|
|
|
|
|
|
JSONObject complianceDetail = clientComplianceCompanyMapper.findKycFileByClientId(clientId);
|
|
|
|
|
|
|
|
if (complianceDetail == null) {
|
|
|
|
|
|
|
|
throw new BadRequestException("无此记录");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (complianceDetail.getIntValue("status") == 1) {
|
|
|
|
|
|
|
|
throw new BadRequestException("审核已通过,请避免重复操作");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
complianceDetail.put("operator_id", manager.getString("manager_id"));
|
|
|
|
|
|
|
|
complianceDetail.put("status",1);
|
|
|
|
|
|
|
|
complianceDetail.put("description",' ');
|
|
|
|
|
|
|
|
clientComplianceCompanyMapper.update(complianceDetail);
|
|
|
|
|
|
|
|
clientFilesMapper.updateFilesAuthStatus(clientId,
|
|
|
|
|
|
|
|
FilesAuthEnum.PASS_OPR.getAfterStatus(),
|
|
|
|
|
|
|
|
FilesAuthEnum.PASS_OPR.getBeforeStatus(),
|
|
|
|
|
|
|
|
FilesAuthEnum.PASS_OPR.getAuthType("kyc"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void refuseComplianceFile(JSONObject manager, int clientId, JSONObject refuseInfo) {
|
|
|
|
public void refuseComplianceFile(JSONObject manager, int clientId, JSONObject refuseInfo) {
|
|
|
|
JSONObject complianceDetail = clientComplianceCompanyMapper.findFileByClientId(clientId);
|
|
|
|
JSONObject complianceDetail = clientComplianceCompanyMapper.findFileByClientId(clientId);
|
|
|
|
@ -156,6 +179,29 @@ public class ClientComplianceApplyImpl implements ClientComplianceApply
|
|
|
|
complianceDetail.put("operator_id", manager.getString("manager_id"));
|
|
|
|
complianceDetail.put("operator_id", manager.getString("manager_id"));
|
|
|
|
complianceDetail.put("status",2);
|
|
|
|
complianceDetail.put("status",2);
|
|
|
|
clientComplianceCompanyMapper.update(complianceDetail);
|
|
|
|
clientComplianceCompanyMapper.update(complianceDetail);
|
|
|
|
clientFilesMapper.refuseCompliance(clientId);
|
|
|
|
clientFilesMapper.updateFilesAuthStatus(clientId,
|
|
|
|
|
|
|
|
FilesAuthEnum.REFUSE_OPR.getAfterStatus(),
|
|
|
|
|
|
|
|
FilesAuthEnum.REFUSE_OPR.getBeforeStatus(),
|
|
|
|
|
|
|
|
FilesAuthEnum.REFUSE_OPR.getAuthType("compliance"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void refuseKycFile(JSONObject manager, int clientId, JSONObject refuseInfo) {
|
|
|
|
|
|
|
|
JSONObject complianceDetail = clientComplianceCompanyMapper.findKycFileByClientId(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.updateFilesAuthStatus(clientId,
|
|
|
|
|
|
|
|
FilesAuthEnum.REFUSE_OPR.getAfterStatus(),
|
|
|
|
|
|
|
|
FilesAuthEnum.REFUSE_OPR.getBeforeStatus(),
|
|
|
|
|
|
|
|
FilesAuthEnum.REFUSE_OPR.getAuthType("kyc"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|