|
|
|
@ -17,6 +17,7 @@ import au.com.royalpay.payment.manage.notice.core.MailService;
|
|
|
|
|
import au.com.royalpay.payment.manage.pushMessage.APNSMessageHelper;
|
|
|
|
|
import au.com.royalpay.payment.manage.pushMessage.bean.AppManagerMessageBuilder;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.core.RiskMaterialService;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.core.RiskProcessLogService;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskEmailStatusEnum;
|
|
|
|
|
import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum;
|
|
|
|
@ -102,6 +103,8 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
|
|
|
|
|
@Resource
|
|
|
|
|
private RiskMaterialMapper riskMaterialMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private RiskMaterialService riskMaterialService;
|
|
|
|
|
@Resource
|
|
|
|
|
private RiskFileMapper riskFileMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private ClientDeviceTokenMapper clientDeviceTokenMapper;
|
|
|
|
@ -424,8 +427,11 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void sendRefuseEmail(String riskId) throws IOException {
|
|
|
|
|
public void sendRefuseEmail(String riskId, String refuseDescription) throws IOException {
|
|
|
|
|
JSONObject event = getRiskEventDetail(riskId);
|
|
|
|
|
if (RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType().intValue() == event.getIntValue("result_type")) {
|
|
|
|
|
throw new BadRequestException("Refused Already!");
|
|
|
|
|
}
|
|
|
|
|
Context ctx = getMailContext(event);
|
|
|
|
|
ctx.setVariable("refuse",true);
|
|
|
|
|
ctx.setVariable("refuse_description", riskMaterialMapper.findAllMaterials(riskId).get(0).getString("refuse_description"));
|
|
|
|
@ -441,6 +447,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
|
|
|
|
|
event.put("result_type",RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType());
|
|
|
|
|
event.put("submit_url",uploadUrl);
|
|
|
|
|
riskEventMapper.update(event);
|
|
|
|
|
riskMaterialService.updateRiskMaterial(riskId, refuseDescription);
|
|
|
|
|
// 日志记录
|
|
|
|
|
riskProcessLogService.addRiskProcessLog(riskId,
|
|
|
|
|
event.getString("fillin_id"),
|
|
|
|
|