add 风控业务事件增加模板选择

master
luoyang 6 years ago
parent d799f1d43e
commit 9f1394df88

@ -787,6 +787,7 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
ctx.setVariable("warning_order_type", event.getIntValue("warning_order_type"));
ctx.setVariable("description", event.getString("description"));
ctx.setVariable("is_send_client",event.getIntValue("is_send_client"));
ctx.setVariable("mail_template",event.get("mail_template")==null?0:event.getIntValue("mail_template"));
String realOrderIdsStr = event.getString("real_order_ids");
String[] realOrderIds = {};
if (StringUtils.isNotBlank(realOrderIdsStr)) {
@ -1202,6 +1203,21 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
"Other pictures"
);
}
if (riskEvent.get("mail_template") != null) {
switch (riskEvent.getIntValue("mail_template")) {
case 1:
materialsRemark = getShopTemplate();
break;
case 2:
materialsRemark = getTicketTemplate();
break;
case 3:
materialsRemark = getStudyTemplate();
break;
default:
break;
}
}
JSONObject material = getRiskMaterial(riskEvent);
for (int i = 0; i < materialsRemark.size(); i++) {
@ -1279,4 +1295,42 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
}
}
}
private List<String> getShopTemplate() {
return Arrays.asList("1.与调查交易金额对应的购物小票/发票存根照片 要求:照片应清晰,必须显示商户名称、商户地址、购物时间、物品名称、购物金额等;\n" +
"Photos of shopping receipts/ invoice stubs Requirement corresponding with the investigated orders Requirement: The photos should be clear and must show Merchant name, Business address, Transaction time, Product information, Quantity purchased, etc;",
"2.购买物品如邮寄至国内,需提供物流公司发货单据,并提供对应物流公司的查询网址;澳洲本地销售则不需要提供物流单据 要求:每笔交易对应的物流单必须提供,且单据必须清晰可见;\n" +
"Photos of logistics companiesgoods-delivery documents if trading across borders with Logistics company inquiry website for verifying; no need for local sales Requirement: The logistics order record corresponding to each transaction must be provided, and details of records should be clearly visible;",
"3.线上用户购买虚拟物品需要提供聊天记录、订单信息、发货凭证截图、 虚拟物品最终消费场景(例如何种游戏、软件)、提供消费场景网址/下载链接(公司官网、公众号等) 要求:每笔交易对应的截图必须清晰可见;\n" +
"Users need to provide chat records, order information, screenshots of delivery documents, final consumption scenarios of virtual goods (such as games, software); provide consumer scene URL / download link(official website/official accounts/other official platforms). Requirement: The screenshot corresponding to each transaction must be clearly visible;",
"4.商户线下门店提供显示商户门牌号码和店头名称的照片;显示商户营业场景所场内部情况(如店内商品陈列、收银台等)的照片 要求照片清晰外景至少一张内景能清楚显示商户实际售卖物品或服务至少三张Photos of Merchant Street number & Merchant name\n" +
"Photos of internal environment of merchant business (such as in-store merchandise display, checkout counter, etc.) Requirements: At least one visible photo of store location; The photos (at least three) showing merchant activities including actual selling-goods or services obviously;",
"5.其它补充材料包含调单任务描述中要求提供的商户后台入驻材料等;商户的经营业务模式说明:介绍售卖的主要物品种类或是提供的服务内容、客单价均值、营业时间等);\n" +
"Other materials including onboarding materials as task description requiredExplanation of business model for your merchant including actual selling-goods or services, per customer transaction, business hours, etc;"
);
}
private List<String> getTicketTemplate() {
return Arrays.asList("1.与调查交易金额对应的购物小票/发票存根照片 要求:照片应清晰,必须显示商户名称、商户地址、购物时间、物品名称、购物金额等;\n" +
"Photos of shopping receipts/ invoice stubs Requirement corresponding with the investigated orders Requirement: The photos should be clear and must show Merchant name, Business address, Transaction time, Product information, Quantity purchased, etc;",
"2.与调查交易相对应的客户旅游行程明细(包含行程单、机票、酒店预订信息等),线上用户购买行程/机票等的聊天记录、订单信息、购买凭证截图、提供消费场景网址/下载链接(公司官网、公众号等) 要求:每笔交易对应的截图必须清晰可见;\n" +
"Users need to provide travel itinerary, hotel reservation Information and journey times of customers about the orders, provide records of investigated orders, provide consumer scene URL / download link(official website/official accounts/other official platforms). Requirement: The screenshot corresponding to each transaction must be clearly visible;",
"3.商户线下门店提供显示商户门牌号码和店头名称的照片(清晰可见,至少一张);显示商户营业场景所场内部情况(如店内商品陈列、收银台等)的照片(照片清晰,且能清楚显示商户实际售卖物品或服务,至少三张 \n" +
"Photos of Merchant Street number & Merchant name; Photos of internal environment of merchant business (such as in-store merchandise display, checkout counter, etc.) Requirements: At least one visible photo of store location; The photos (at least three) showing merchant activities including actual selling-goods or services obviously;",
"4.其它补充材料包含调单任务描述中要求提供的商户后台入驻材料等;商户的经营业务模式说明:介绍售卖的主要物品种类或是提供的服务内容、客单价均值、营业时间等);\n" +
"Other materials including onboarding materials as task description requiredExplanation of business model for your merchant including actual selling-goods or services, per customer transaction, business hours, etc;"
);
}
private List<String> getStudyTemplate() {
return Arrays.asList("1.与调查交易金额对应的购物小票/发票存根照片 要求:照片应清晰,必须显示商户名称、商户地址、购物时间、物品名称、购物金额等;\n" +
"Photos of shopping receipts/ invoice stubs Requirement corresponding with the investigated orders Requirement: The photos should be clear and must show Merchant name, Business address, Transaction time, Product information, Quantity purchased, etc;",
"2.与调查交易相对应的客户支付购买的课程明细、教育服务(签证、咨询等)明细,单价,数量,具体购买服务内容,线上用户购买的聊天记录、购买凭证截图、提供消费场景网址/下载链接(公司官网、公众号等) 要求:每笔交易对应的截图必须清晰可见;\n" +
"Users need to provide the details of purchased courses/education services(visa services/consulting/others) including price, quantity, service details, chat records online, order information, screenshots of system ordered details; provide consumer scene URL / download link(official website/official accounts/other official platforms). Requirement: The screenshot corresponding to each transaction must be clearly visible;",
"3.商户线下门店提供显示商户门牌号码和店头名称的照片(清晰可见,至少一张);显示商户营业场景所场内部情况(如店内商品陈列、收银台等)的照片(照片清晰,且能清楚显示商户实际售卖物品或服务,至少三张 \n" +
"Photos of Merchant Street number & Merchant name; Photos of internal environment of merchant business (such as in-store merchandise display, checkout counter, etc.) Requirements: At least one visible photo of store location; The photos (at least three) showing merchant activities including actual selling-goods or services obviously;",
"4.其它补充材料包含调单任务描述中要求提供的商户后台入驻材料等;商户的经营业务模式说明:介绍售卖的主要物品种类或是提供的服务内容、客单价均值、营业时间等);\n" +
"Other materials including onboarding materials as task description requiredExplanation of business model for your merchant including actual selling-goods or services, per customer transaction, business hours, etc;"
);
}
}

@ -23,8 +23,15 @@
before <span style="background: #FCE824;" th:text="${reply_date_english}"></span>(Sydney time).
</p>
<p>1、请提供以下被查单号的小票 物流单据(如有邮寄产品的情况), 以及消费者与买家的聊天记录等来佐证被查交易单号。 被查交易单号如下:</p>
<p>1. Please submit the materials including invoices, courier receipts (if have posted products), and chatting records or scene of consumption which can prove the facticity of the following reviewed orders. The reviewed orders as follows:</p>
<p th:if="${mail_template==0}">1、请提供以下被查单号的小票 物流单据(如有邮寄产品的情况), 以及消费者与买家的聊天记录等来佐证被查交易单号。 被查交易单号如下:</p>
<p th:if="${mail_template==0}">1. Please submit the materials including invoices, courier receipts (if have posted products), and chatting records or scene of consumption which can prove the facticity of the following reviewed orders. The reviewed orders as follows:</p>
<p th:if="${mail_template==1}">1、请提供以下被查单号的交易相关发票对应的物流单据如有邮寄产品的情况 以及体现消费场景的聊天截图等来佐证被查交易单号。 被查交易单号如下:</p>
<p th:if="${mail_template==1}">1. Please submit the materials including invoices, courier receipts (if have posted products), and chatting records or scene of consumption which can prove the facticity of the following reviewed orders. The reviewed orders as follows:</p>
<p th:if="${mail_template==2}">1、请提供以下被查单号的交易相关票据对应消费项目的行程单、机票、酒店预定凭证等 以及体现消费场景的聊天截图等来佐证被查交易单号。 被查交易单号如下:</p>
<p th:if="${mail_template==2}">1. Please submit the materials including invoices, courier receipts (if have posted products), and chatting records or scene of consumption which can prove the facticity of the following reviewed orders. The reviewed orders as follows:</p>
<p th:if="${mail_template==3}">1、请提供以下被查单号的交易相关票据详细购买的具体课程、服务、咨询明细 以及体现消费场景的聊天截图等来佐证被查交易单号。 被查交易单号如下:</p>
<p th:if="${mail_template==3}">1. Please submit the materials including invoices, courier receipts (if have posted products), and chatting records or scene of consumption which can prove the facticity of the following reviewed orders. The reviewed orders as follows:</p>
<table style="border: 1.0px solid;border-collapse: collapse;">
<thead>
<tr>

@ -4,6 +4,14 @@
define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
function (angular, $) {
'use strict';
var mailTemplate = {
"1": "代购、综合商城类",
"2": "飞机票、旅行社类",
"3": "教育类、中介类"
};
var orderTypesMap = {
"1": "微信调单",
"2": "支付宝调单",
@ -129,7 +137,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}]);
app.controller('riskBusinessCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'industryMap','chartParser',
app.controller('riskBusinessCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'industryMap', 'chartParser',
function ($scope, $state, $http, $uibModal, $filter, commonDialog, industryMap, chartParser) {
$scope.orderTypes = orderTypesMap;
$scope.orderTypesForBD = orderTypesMapForBD;
@ -269,12 +277,32 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
function ($scope, $state, $http, $uibModal, $filter, Upload, commonDialog, riskEvent, orderService) {
$scope.orderTypes = orderTypesMap;
$scope.mailTemplate = mailTemplate;
$scope.resultTypes = resultTypesMap;
$scope.channelResults = channelResultArray;
if (riskEvent.data.is_send_client == 1)
riskEvent.data.is_send_client = true;
$scope.riskEvent = riskEvent.data;
$scope.checkTemplate = function () {
var url = "";
switch ($scope.riskEvent.mail_template) {
case "1":
url = "https://file.royalpay.com.au/open/2019/03/27/1553658222567_BzfAtsEgsBdMQLl3jGOAlfcYmFUL1F.png";
break;
case "2":
url = "https://file.royalpay.com.au/open/2019/03/27/1553658193577_ddF4FAQYBaMx2oCEUlD2f2NtW3SxYD.png";
break;
case "3":
url = "https://file.royalpay.com.au/open/2019/03/27/1553658238130_VJPI3RNmyKtcOgsV8w8yswUsYMFvGs.png\n";
break;
default:
break;
}
window.open(url, '_blank');
};
$http.get('/risk/business/process/logs/' + $scope.riskEvent.risk_id).then(function (resp) {
$scope.riskEvent.process_logs = resp.data;
});
@ -300,7 +328,11 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}).then(function () {
$http.delete('/risk/business/ban/' + $scope.riskEvent.risk_id).then(function () {
$state.go('analysis_monitoring.risk_business');
commonDialog.alert({title: 'Delete', content: 'Risk Event Already Disabled', type: 'error'});
commonDialog.alert({
title: 'Delete',
content: 'Risk Event Already Disabled',
type: 'error'
});
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
@ -665,11 +697,30 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.receive_email_date = new Date();
$scope.today = new Date();
$scope.orderTypes = orderTypesMap;
$scope.mailTemplate = mailTemplate;
$scope.royapayOrderTypes = royalpayOrderTypesMap;
$scope.warningOrderTypes = warningOrderTypesMap;
$scope.materials = [{key: 0, value: ""}];
$scope.canMinus = false;
$scope.riskEvent = {};
$scope.checkTemplate = function () {
var url = "";
switch ($scope.riskEvent.mail_template) {
case "1":
url = "https://file.royalpay.com.au/open/2019/03/27/1553658222567_BzfAtsEgsBdMQLl3jGOAlfcYmFUL1F.png";
break;
case "2":
url = "https://file.royalpay.com.au/open/2019/03/27/1553658193577_ddF4FAQYBaMx2oCEUlD2f2NtW3SxYD.png";
break;
case "3":
url = "https://file.royalpay.com.au/open/2019/03/27/1553658238130_VJPI3RNmyKtcOgsV8w8yswUsYMFvGs.png\n";
break;
default:
break;
}
window.open(url, '_blank');
};
$scope.increase = function($index) {
$scope.materials.splice($index + 1, 0,
{key: new Date().getTime(), value: ""}); // 用时间戳作为每个item的key
@ -799,6 +850,12 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}
});
app.filter('templateType', function () {
return function (type) {
return mailTemplate[type];
}
});
app.filter('royalPayOrderType', function() {
return function(type) {
return royalpayOrderTypesMap[type];

@ -230,6 +230,32 @@
</div>
</div>
<div class="form-group"
ng-class="{'has-error':riskEventForm.mail_template.$invalid && riskEventForm.mail_template.$dirty}">
<label class="control-label col-sm-2"
for="mail-template-input">WEB/Mail Template
</label>
<div class="col-sm-6">
<select class="form-control"
name="mail_template"
ng-model="riskEvent.mail_template"
id="mail-template-input"
required
ng-options="key as value for (key, value) in mailTemplate">
<option value="">Please Choose</option>
</select>
<div ng-messages="riskEventForm.mail_template.$error"
ng-if="riskEventForm.mail_template.$dirty">
<p class="small text-danger"
ng-message="required">required field
</p>
</div>
</div>
<div class="col-sm-2" ng-if="riskEvent.mail_template">
<button class="btn btn-link" ng-click="checkTemplate()">查看模板</button>
</div>
</div>
<div class="form-group" ng-if="riskEvent.order_type != 5">
<label class="control-label col-sm-2">是否发送商户</label>
<div class="col-xs-6">

@ -156,6 +156,15 @@
</div>
</div>
<div class="form-group" ng-if="riskEvent.mail_template">
<label class="control-label col-sm-2">WEB/Mail Template</label>
<div class="col-sm-10">
<p class="form-control-static"
ng-bind="riskEvent.mail_template | templateType">
</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">是否发送商户</label>
<div class="col-xs-6">
@ -524,6 +533,33 @@
</div>
</div>
<div class="form-group"
ng-class="{'has-error':riskEventForm.mail_template.$invalid && riskEventForm.mail_template.$dirty}">
<label class="control-label col-sm-2"
for="mail-template-input">WEB/Mail Template
</label>
<div class="col-sm-6">
<select class="form-control"
name="mail_template"
ng-model="riskEvent.mail_template"
id="mail-template-input"
required
ng-options="key as value for (key, value) in mailTemplate">
<option value="">Please Choose</option>
</select>
<div ng-messages="riskEventForm.mail_template.$error"
ng-if="riskEventForm.mail_template.$dirty">
<p class="small text-danger"
ng-message="required">required field
</p>
</div>
</div>
<div class="col-sm-2" ng-if="riskEvent.mail_template">
<button class="btn btn-link" ng-click="checkTemplate()">查看模板</button>
</div>
</div>
<div class="form-group" ng-if="riskEvent.order_type != 5">
<label class="control-label col-sm-2">是否发送商户</label>
<div class="col-xs-6">

Loading…
Cancel
Save