From cf7e8cbcaa6ece39bed6758d1003e8b26cf95a59 Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 13 Aug 2019 18:38:14 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E9=A3=8E=E6=8E=A7=E4=B8=9A=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../riskbusiness/core/impl/RiskBusinessServiceImpl.java | 7 ++++++- src/main/ui/static/analysis/risk_business.js | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 6dec3b041..52dd127ca 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 manage - 1.1.14 + 1.1.15 UTF-8 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 1b613be35..1697bf419 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 @@ -685,7 +685,12 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo riskMaterialService.updateRiskMaterial(riskId, refuseDescription); Context ctx = getMailContext(event); ctx.setVariable("refuse",true); - ctx.setVariable("refuse_description", riskMaterialMapper.findAllMaterials(riskId).get(0).getString("refuse_description")); + List findAllMaterials = riskMaterialMapper.findAllMaterials(riskId); + if (findAllMaterials == null || findAllMaterials.size() == 0) { + ctx.setVariable("refuse_description", ""); + }else { + ctx.setVariable("refuse_description", findAllMaterials.get(0).getString("refuse_description")); + } final List emailsTos = (List)ctx.getVariable("emailsTos"); final List emailsCcs = ctx.getVariable("emailsCcs")==null?new ArrayList<>():(List)ctx.getVariable("emailsCcs"); final String uploadUrl = (String)ctx.getVariable("uploadUrl"); diff --git a/src/main/ui/static/analysis/risk_business.js b/src/main/ui/static/analysis/risk_business.js index 399129b1b..af3a2fca3 100644 --- a/src/main/ui/static/analysis/risk_business.js +++ b/src/main/ui/static/analysis/risk_business.js @@ -336,7 +336,10 @@ 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); + var index = $scope.riskEvent.submit_url.lastIndexOf('='); + if (index < 0) + index = $scope.riskEvent.submit_url.lastIndexOf('/'); + var codeKey = $scope.riskEvent.submit_url.substring(index + 1); commonDialog.confirm({ title: '确认已提交资料', content: '确认已收到商户资料,更新风控状态为等待风控审核?'