From af7885d67124a5bf4d81737135be62a4a0352c30 Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 13 Aug 2019 17:18:54 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E9=A3=8E=E6=8E=A7=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E6=94=B6=E5=88=B0=E9=A3=8E=E6=8E=A7=E6=9D=90=E6=96=99=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../core/RiskBusinessService.java | 2 ++ .../core/impl/RiskBusinessServiceImpl.java | 22 +++++++++++++++++++ .../web/RiskBusinessController.java | 5 +++++ src/main/ui/static/analysis/risk_business.js | 16 ++++++++++++++ .../analysis/templates/riskEvent_detail.html | 5 +++++ 6 files changed, 51 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 73e5cb385..4cf7d9a3b 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 manage - 1.1.12 + 1.1.13 UTF-8 diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/RiskBusinessService.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/RiskBusinessService.java index fd1a97767..a1273d3d8 100644 --- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/RiskBusinessService.java +++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/RiskBusinessService.java @@ -135,6 +135,8 @@ public interface RiskBusinessService { void banRiskEvent(String riskId); + void commitWaitRiskStatus(String riskId, String codeKey, JSONObject manager); + JSONObject riskEventMaterialPass(JSONObject params, JSONObject manager); JSONObject updateIsSendClient(String riskId); diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java index 1b7a12766..1b613be35 100644 --- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/core/impl/RiskBusinessServiceImpl.java @@ -18,6 +18,7 @@ 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.core.RiskUploadService; import au.com.royalpay.payment.manage.riskbusiness.enums.RiskEmailStatusEnum; import au.com.royalpay.payment.manage.riskbusiness.enums.RiskResultTypeEnum; import au.com.royalpay.payment.manage.signin.beans.TodoNotice; @@ -100,6 +101,8 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo @Resource private TradeLogService tradeLogService; @Resource + private RiskUploadService riskUploadService; + @Resource private RoyalThreadPoolExecutor royalThreadPoolExecutor; private final String UPLOAD_MAIL_PREFIX = "UPLOAD_MAIL"; @@ -1247,6 +1250,25 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo riskEventMapper.update(params); } + @Override + public void commitWaitRiskStatus(String riskId, String codeKey, JSONObject manager) { + JSONObject event = riskEventMapper.findById(riskId); + if (event.getIntValue("result_type") != RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType() &&event.getIntValue("result_type") != RiskResultTypeEnum.MATERIAL_NOT_PASS.getResultType()) { + throw new BadRequestException("风控调单不存在或资料已补全"); + } + if(event.getIntValue("result_type")!= RiskResultTypeEnum.MATERIAL_AUDIT_PASS.getResultType()){ + event.put("result_type", RiskResultTypeEnum.WAIT_FOR_AUDIT.getResultType()); + riskEventMapper.update(event); + } + riskProcessLogService.addRiskProcessLog(riskId, + manager.getString("manager_id"), + manager.getString("display_name"), + RiskResultTypeEnum.WAIT_FOR_AUDIT.getRemark(), + RiskResultTypeEnum.SEND_EMAIL_TO_BD.getResultType(), + RiskResultTypeEnum.WAIT_FOR_AUDIT.getResultType()); + riskUploadService.deleteUploadMailKey(codeKey); + } + @Transactional @Override public JSONObject riskEventMaterialPass(JSONObject params, JSONObject manager) { diff --git a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskBusinessController.java b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskBusinessController.java index 53839c21b..489dde36e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskBusinessController.java +++ b/src/main/java/au/com/royalpay/payment/manage/riskbusiness/web/RiskBusinessController.java @@ -170,6 +170,11 @@ public class RiskBusinessController { riskBusinessService.banRiskEvent(risk_id); } + @RequestMapping(value = "/commitWaitRiskStatus/{risk_id}/{codeKey}", method = RequestMethod.PUT) + public void commitWaitRiskStatus(@PathVariable String risk_id,@PathVariable String codeKey,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + riskBusinessService.commitWaitRiskStatus(risk_id, codeKey, manager); + } + @GetMapping(value = "/partners") public List getPartners(PartnerQuery partnerQuery) { JSONObject param = partnerQuery.toJsonParam(); diff --git a/src/main/ui/static/analysis/risk_business.js b/src/main/ui/static/analysis/risk_business.js index 60bb3991d..399129b1b 100644 --- a/src/main/ui/static/analysis/risk_business.js +++ b/src/main/ui/static/analysis/risk_business.js @@ -335,6 +335,22 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'], }) }; + $scope.commitWaitRiskStatus = function () { + var codeKey = $scope.riskEvent.submit_url.substring($scope.riskEvent.submit_url.lastIndexOf('=') + 1) || $scope.riskEvent.submit_url.substring($scope.riskEvent.submit_url.lastIndexOf('/') + 1); + commonDialog.confirm({ + title: '确认已提交资料', + content: '确认已收到商户资料,更新风控状态为等待风控审核?' + }).then(function () { + $http.put('/risk/business/commitWaitRiskStatus/' + $scope.riskEvent.risk_id + '/' + codeKey).then(function () { + $state.go('analysis_monitoring.risk_business'); + commonDialog.alert({title: 'Success', content: '风控状态已修改为等待风控审核状态', type: 'success'}); + }, function (resp) { + commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + }); + + }) + }; + /** * order_ids在指定位置换行 * @param str diff --git a/src/main/ui/static/analysis/templates/riskEvent_detail.html b/src/main/ui/static/analysis/templates/riskEvent_detail.html index a776bf199..72a762d17 100644 --- a/src/main/ui/static/analysis/templates/riskEvent_detail.html +++ b/src/main/ui/static/analysis/templates/riskEvent_detail.html @@ -23,6 +23,11 @@
  • Audit material
  • +
  • +
    + +
    +