[fix]完善风控业务流程

master
hellolujian 6 years ago
parent 8502b52c3f
commit d0532b21da

@ -26,7 +26,6 @@ public interface RiskEventMapper {
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
List<JSONObject> findAll(JSONObject params); List<JSONObject> findAll(JSONObject params);
@AutoSql(type = SqlType.SELECT)
PageList<JSONObject> listRisksByPage(JSONObject params, PageBounds pageBounds); PageList<JSONObject> listRisksByPage(JSONObject params, PageBounds pageBounds);
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)

@ -32,6 +32,13 @@ public interface RiskBusinessService {
*/ */
JSONObject getRiskEventDetail(String riskId); JSONObject getRiskEventDetail(String riskId);
/**
*
* @param orderIds
* @return
*/
List<JSONObject> getRiskEventOrderList(String orderIds);
/** /**
* *
* @param params * @param params

@ -1,5 +1,6 @@
package au.com.royalpay.payment.manage.riskbusiness.core.impl; package au.com.royalpay.payment.manage.riskbusiness.core.impl;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskEventMapper; import au.com.royalpay.payment.manage.mappers.riskbusiness.RiskEventMapper;
import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService; import au.com.royalpay.payment.manage.riskbusiness.core.RiskBusinessService;
import au.com.royalpay.payment.tools.utils.PageListUtils; import au.com.royalpay.payment.tools.utils.PageListUtils;
@ -10,6 +11,7 @@ import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -22,6 +24,9 @@ public class RiskBusinessServiceImpl implements RiskBusinessService {
@Autowired @Autowired
private RiskEventMapper riskEventMapper; private RiskEventMapper riskEventMapper;
@Autowired
private OrderMapper orderMapper;
@Override @Override
public List<JSONObject> getRiskEvents(JSONObject params) { public List<JSONObject> getRiskEvents(JSONObject params) {
return riskEventMapper.findAll(params); return riskEventMapper.findAll(params);
@ -39,6 +44,23 @@ public class RiskBusinessServiceImpl implements RiskBusinessService {
return riskEventMapper.findById(riskId); return riskEventMapper.findById(riskId);
} }
@Override
public List<JSONObject> getRiskEventOrderList(String orderIds) {
String[] orderIdArray = orderIds.trim().split(",");
JSONObject query = new JSONObject();
List<JSONObject> tradeLogs = new ArrayList<>();
// 获取每笔订单的信息
for (int i = 0; i < orderIdArray.length; i++) {
query.put("order_id", orderIdArray[i]);
PageList<JSONObject> logs = orderMapper.listOrders(query, new PageBounds());
if (logs != null && logs.size() != 0) {
tradeLogs.add(logs.get(0));
}
}
return tradeLogs;
}
@Override @Override
public void addRiskEvent(JSONObject params) { public void addRiskEvent(JSONObject params) {
riskEventMapper.save(params); riskEventMapper.save(params);

@ -9,10 +9,6 @@ import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -34,8 +30,12 @@ public class RiskBusinessController {
} }
@GetMapping(value = "events/{risk_id}") @GetMapping(value = "events/{risk_id}")
public JSONObject getRiskEventDetail(@PathVariable("risk_id") String riskId) { public JSONObject getRiskEventDetail(@PathVariable("risk_id") String riskId,
return riskBusinessService.getRiskEventDetail(riskId); @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject riskEvent = riskBusinessService.getRiskEventDetail(riskId);
List<JSONObject> tradeLogs = riskBusinessService.getRiskEventOrderList(riskEvent.getString("order_ids"));
riskEvent.put("tradeLogs", tradeLogs);
return riskEvent;
} }
@PostMapping(value = "events") @PostMapping(value = "events")

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.riskbusiness.RiskEventMapper">
<select id="listRisksByPage" resultType="com.alibaba.fastjson.JSONObject">
SELECT *
from risk_event
<where>
<if test="client_moniker != null">
AND client_moniker = #{client_moniker}
</if>
<if test="order_type != null">
AND order_type = #{order_type}
</if>
<if test="order_ids != null">
AND order_ids LIKE CONCAT('%', #{order_ids}, '%')
</if>
</where>
</select>
</mapper>

@ -4,13 +4,25 @@
define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'], define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
function (angular, $) { function (angular, $) {
'use strict'; 'use strict';
var orderTypes = { var orderTypesMap = {
"1": "微信调单", "1": "微信调单",
"2": "支付宝调单", "2": "支付宝调单",
"3": "RoyalPay调单", "3": "RoyalPay调单",
"4": "警告", "4": "警告",
"5": "通用号调单" "5": "通用号调单"
}; };
var resultTypesMap = {
"0": "未处理",
"1": "处理中",
"2": "已处理"
};
var emailStatusMap = {
"0": "未发送",
"1": "已发送"
};
var app = angular.module('riskBusinessApp', ['ui.router']); var app = angular.module('riskBusinessApp', ['ui.router']);
app.config(['$stateProvider', function ($stateProvider) { app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('analysis_monitoring.risk_business', { $stateProvider.state('analysis_monitoring.risk_business', {
@ -37,7 +49,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
app.controller('riskBusinessCtrl', ['$scope', '$state', '$http', '$uibModal', 'commonDialog', app.controller('riskBusinessCtrl', ['$scope', '$state', '$http', '$uibModal', 'commonDialog',
function ($scope, $state, $http, $uibModal, commonDialog) { function ($scope, $state, $http, $uibModal, commonDialog) {
$scope.orderTypes = orderTypes; $scope.orderTypes = orderTypesMap;
$scope.pagination = {}; $scope.pagination = {};
$scope.params = {}; $scope.params = {};
@ -51,18 +63,32 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}; };
$scope.loadRiskEvents(1); $scope.loadRiskEvents(1);
} }
]); ]);
app.controller('riskEventDetailCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'riskEvent', app.controller('riskEventDetailCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'riskEvent',
function ($scope, $state, $http, $uibModal, $filter, commonDialog, riskEvent) { function ($scope, $state, $http, $uibModal, $filter, commonDialog, riskEvent) {
$scope.riskEvent = riskEvent.data; $scope.riskEvent = riskEvent.data;
// 编辑表格的数据保存对象,重新从源数据复制,从而取消保存操作时不会更新视图
$scope.riskEventEdit = angular.copy(riskEvent.data);
// order_type转换为string类型是因为前端select控件这样才会显示初值
$scope.riskEventEdit.order_type += "";
// 调单信息
$scope.tradeLogs = $scope.riskEvent.tradeLogs;
$scope.orderTypes = orderTypesMap;
// 控制编辑表格的显示
$scope.editFlag = false; $scope.editFlag = false;
$scope.changeEditFlag = function(editFlag) { $scope.changeEditFlag = function(editFlag) {
$scope.editFlag = !editFlag; $scope.editFlag = !editFlag;
// 如果是在编辑状态需要将日期转换为date类型前端控件需要
// 如果是在非编辑状态需要将日期转换为yyyy-MM-dd格式
if ($scope.editFlag) { if ($scope.editFlag) {
$scope.riskEvent.reply_email_date = new Date($scope.riskEvent.reply_email_date.replace(/-/g, "/")); $scope.riskEventEdit.reply_email_date = new Date($scope.riskEventEdit.reply_email_date.replace(/-/g, "/"));
} else { } else {
$scope.riskEvent.reply_email_date = $filter('date')($scope.riskEvent.reply_email_date, 'yyyy-MM-dd'); $scope.riskEvent.reply_email_date = $filter('date')($scope.riskEvent.reply_email_date, 'yyyy-MM-dd');
} }
@ -78,8 +104,9 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
return; return;
} }
$scope.riskEvent.reply_email_date = $filter('date')($scope.riskEvent.reply_email_date, 'yyyy-MM-dd'); // 保存时需要重新将日期转换为yyyy-MM-dd格式传入后端
$http.put('/risk/business/events', $scope.riskEvent).then(function (resp) { $scope.riskEventEdit.reply_email_date = $filter('date')($scope.riskEventEdit.reply_email_date, 'yyyy-MM-dd');
$http.put('/risk/business/events', $scope.riskEventEdit).then(function (resp) {
commonDialog.alert({ commonDialog.alert({
title: 'Success', title: 'Success',
content: 'Update riskEvent successfully', content: 'Update riskEvent successfully',
@ -93,13 +120,14 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
type: 'error' type: 'error'
}); });
}); });
} };
} }
]); ]);
app.controller('newRiskEventCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', app.controller('newRiskEventCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog',
function ($scope, $state, $http, $uibModal, $filter, commonDialog) { function ($scope, $state, $http, $uibModal, $filter, commonDialog) {
$scope.orderTypes = orderTypes;
$scope.orderTypes = orderTypesMap;
$scope.save = function(form) { $scope.save = function(form) {
if (form.$invalid) { if (form.$invalid) {
@ -111,6 +139,7 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
return; return;
} }
// 默认设置邮件回复截止日期为七天后
var replyDeadline = new Date(); var replyDeadline = new Date();
replyDeadline.setDate(replyDeadline.getDate() + 7); replyDeadline.setDate(replyDeadline.getDate() + 7);
$scope.riskEvent.reply_email_date = $filter('date')(replyDeadline, 'yyyy-MM-dd'); $scope.riskEvent.reply_email_date = $filter('date')(replyDeadline, 'yyyy-MM-dd');
@ -133,5 +162,26 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
} }
]); ]);
// 调单类型过滤器
app.filter('orderType', function() {
return function(type) {
return orderTypesMap[type];
}
});
// 处理结果过滤器
app.filter('resultType', function() {
return function(type) {
return resultTypesMap[type];
}
});
// 邮件发送状态过滤器
app.filter('emailStatus', function() {
return function(status) {
return emailStatusMap[status];
}
});
return app; return app;
}); });

@ -12,23 +12,30 @@
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}"> ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}">
<label class="control-label col-sm-2" for="short-id-input">* Partner Code</label> <label class="control-label col-sm-2"
for="short-id-input">* Partner Code
</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control text-uppercase" <input class="form-control"
ng-model="riskEvent.client_moniker" ng-model="riskEvent.client_moniker"
type="text" type="text"
name="client_moniker" name="client_moniker"
id="short-id-input" required maxlength="6" id="short-id-input"
required
maxlength="6"
ng-pattern="/^[a-zA-Z0-9]+$/"> ng-pattern="/^[a-zA-Z0-9]+$/">
<div ng-messages="riskEventForm.client_moniker.$error" <div ng-messages="riskEventForm.client_moniker.$error"
ng-if="riskEventForm.client_moniker.$dirty"> ng-if="riskEventForm.client_moniker.$dirty">
<p class="small text-danger" ng-message="required">Required <p class="small text-danger"
Field</p> ng-message="required">Required Field
<p class="small text-danger" ng-message="maxlength">Less </p>
Than 6 Letters</p> <p class="small text-danger"
<p class="small text-danger" ng-message="pattern">Only ng-message="maxlength">Less Than 6 Letters
Uppercase Letters and </p>
Numbers are allowed</p> <p class="small text-danger"
ng-message="pattern">
Only Uppercase Letters and Numbers are allowed
</p>
</div> </div>
</div> </div>
</div> </div>
@ -36,18 +43,21 @@
<div class="form-group" <div class="form-group"
ng-class="{'has-error':riskEventForm.order_type.$invalid && riskEventForm.order_type.$dirty}"> ng-class="{'has-error':riskEventForm.order_type.$invalid && riskEventForm.order_type.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="order-type-input">Order Type</label> for="order-type-input">Order Type
</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select class="form-control" name="order_type" <select class="form-control"
name="order_type"
ng-model="riskEvent.order_type" ng-model="riskEvent.order_type"
id="order-type-input" required id="order-type-input"
required
ng-options="key as value for (key, value) in orderTypes"> ng-options="key as value for (key, value) in orderTypes">
<option value="">Please Choose</option> <option value="">Please Choose</option>
</select> </select>
<div ng-messages="riskEventForm.order_type.$error" <div ng-messages="riskEventForm.order_type.$error"
ng-if="riskEventForm.order_type.$dirty"> ng-if="riskEventForm.order_type.$dirty">
<p class="small text-danger" ng-message="required"> <p class="small text-danger"
required field ng-message="required">required field
</p> </p>
</div> </div>
</div> </div>
@ -55,40 +65,46 @@
<div class="form-group" <div class="form-group"
ng-class="{'has-error':riskEventForm.order_ids.$invalid && riskEventForm.order_ids.$dirty}"> ng-class="{'has-error':riskEventForm.order_ids.$invalid && riskEventForm.order_ids.$dirty}">
<label class="control-label col-sm-2" for="order-ids-input">Order IDs</label> <label class="control-label col-sm-2"
for="order-ids-input">Order IDs</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="riskEvent.order_ids" type="text" <input class="form-control"
ng-model="riskEvent.order_ids"
type="text"
name="order_ids" name="order_ids"
id="order-ids-input" id="order-ids-input"
required> required>
<div ng-messages="riskEventForm.order_ids.$error" <div ng-messages="riskEventForm.order_ids.$error"
ng-if="riskEventForm.order_ids.$dirty"> ng-if="riskEventForm.order_ids.$dirty">
<p class="small text-danger" ng-message="required"> <p class="small text-danger"
required field ng-message="required">required field
</p> </p>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" for="description-input">Description</label> <label class="control-label col-sm-2"
for="description-input">Description
</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="riskEvent.description" type="text" <input class="form-control"
ng-model="riskEvent.description"
type="text"
name="description" name="description"
id="description-input"> id="description-input">
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="btn-group margin-bottom margin-top"> <div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button" ng-click="save(riskEventForm)">Save <button class="btn btn-success"
type="button"
ng-click="save(riskEventForm)">Save
</button> </button>
</div> </div>
</form> </form>

@ -10,36 +10,55 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
RiskEvent Basic Information RiskEvent Basic Information
<a role="button" class="pull-right" <a role="button"
class="pull-right"
ng-click="changeEditFlag(editFlag)"> ng-click="changeEditFlag(editFlag)">
<i class="fa fa-edit"></i> Edit <i class="fa fa-edit"></i> Edit
</a> </a>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Partner Code</label> <label class="control-label col-sm-2">Partner Code</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static" ng-bind="riskEvent.client_moniker"></p> <p class="form-control-static"
ng-bind="riskEvent.client_moniker"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Order IDs</label>
<div class="col-sm-10">
<p class="form-control-static"
ng-bind="riskEvent.order_ids">
</p>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Order Type</label> <label class="control-label col-sm-2">Order Type</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static" ng-bind="riskEvent.order_type"></p> <p class="form-control-static"
ng-bind="riskEvent.order_type | orderType">
</p>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Result Type</label> <label class="control-label col-sm-2">Result Type</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static" ng-bind="riskEvent.result_type"></p> <p class="form-control-static">
{{riskEvent.result_type | resultType}}
</p>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Email Status</label> <label class="control-label col-sm-2">Email Status</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static" ng-bind="riskEvent.email_status"></p> <p class="form-control-static"
ng-bind="riskEvent.email_status | emailStatus"></p>
</div> </div>
</div> </div>
@ -55,13 +74,15 @@
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Description</label> <label class="control-label col-sm-2">Description</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static" ng-bind="riskEvent.description"></p> <p class="form-control-static"
ng-bind="riskEvent.description">
</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 调单信息 --> <!-- 调单信息 -->
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
@ -69,47 +90,48 @@
Orders Information Orders Information
</h3> </h3>
</div> </div>
<div class="box-body table-responsive"> <div class="box-body table-responsive">
<table class="table table-bordered table-hover table-striped"> <table class="table table-bordered table-hover table-striped">
<thead> <thead>
<tr> <tr>
<th>Order ID</th> <th>Order ID</th>
<th>Amount</th> <th>Amount</th>
<th>Input Amount</th> <th>Input Amount</th>
<th>AUD Amount</th> <th>AUD Amount</th>
<th>Exchange Rate</th> <th>Exchange Rate</th>
<th>Status</th> <th>Status</th>
<th>Create Time</th> <th>Create Time</th>
<th>Gateway</th> <th>Gateway</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="trade in tradeLogs" ng-class="{warning:trade.clearing_status==2}"> <tr ng-repeat="trade in tradeLogs"
ng-class="{warning:trade.clearing_status==2}">
<td>{{trade.order_id}}</td> <td>{{trade.order_id}}</td>
<td>{{trade.total_amount|currency:trade.currency}}</td> <td>{{trade.total_amount | currency: trade.currency}}</td>
<td ng-bind="trade.display_amount|currency:trade.currency"></td> <td ng-bind="trade.display_amount | currency: trade.currency"></td>
<td ng-bind="trade.clearing_amount|currency:'AUD'"></td> <td ng-bind="trade.clearing_amount | currency: 'AUD'"></td>
<td> <td>
<span ng-if="(trade.channel != 'hf') && (trade.channel != 'Rpay')" ng-bind="trade.exchange_rate"></span> <span ng-if="(trade.channel != 'hf') && (trade.channel != 'Rpay')"
<span ng-if="(trade.channel == 'hf') || (trade.channel == 'Rpay')"> - </span> ng-bind="trade.exchange_rate">
</td> </span>
<td ng-bind="trade.status|tradeStatus"></td> <span ng-if="(trade.channel == 'hf') || (trade.channel == 'Rpay')"> - </span>
<td ng-bind="trade.create_time"></td> </td>
<td ng-bind="trade.gateway|tradeGateway"></td> <td ng-bind="trade.status | tradeStatus"></td>
</tr> <td ng-bind="trade.create_time"></td>
<td ng-bind="trade.gateway | tradeGateway"></td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<a role="button" class="btn btn-info"> <a role="button"
Send Email class="btn btn-info">Send Email
</a> </a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@ -122,23 +144,30 @@
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}"> ng-class="{'has-error':riskEventForm.client_moniker.$invalid && riskEventForm.client_moniker.$dirty}">
<label class="control-label col-sm-2" for="short-id-input">* Partner Code</label> <label class="control-label col-sm-2"
for="short-id-input">* Partner Code
</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control text-uppercase" <input class="form-control text-uppercase"
ng-model="riskEvent.client_moniker" ng-model="riskEventEdit.client_moniker"
type="text" type="text"
name="client_moniker" name="client_moniker"
id="short-id-input" required maxlength="6" id="short-id-input"
required
maxlength="6"
ng-pattern="/^[a-zA-Z0-9]+$/"> ng-pattern="/^[a-zA-Z0-9]+$/">
<div ng-messages="riskEventForm.client_moniker.$error" <div ng-messages="riskEventForm.client_moniker.$error"
ng-if="riskEventForm.client_moniker.$dirty"> ng-if="riskEventForm.client_moniker.$dirty">
<p class="small text-danger" ng-message="required">Required <p class="small text-danger"
Field</p> ng-message="required">Required Field
<p class="small text-danger" ng-message="maxlength">Less </p>
Than 6 Letters</p> <p class="small text-danger"
<p class="small text-danger" ng-message="pattern">Only ng-message="maxlength">Less Than 6 Letters
Uppercase Letters and </p>
Numbers are allowed</p> <p class="small text-danger"
ng-message="pattern">
Only Uppercase Letters and Numbers are allowed
</p>
</div> </div>
</div> </div>
</div> </div>
@ -146,18 +175,22 @@
<div class="form-group" <div class="form-group"
ng-class="{'has-error':riskEventForm.order_type.$invalid && riskEventForm.order_type.$dirty}"> ng-class="{'has-error':riskEventForm.order_type.$invalid && riskEventForm.order_type.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="order-type-input">Order Type</label> for="order-type-input">Order Type
</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select class="form-control" name="order_type" <select class="form-control"
ng-model="riskEvent.order_type" name="order_type"
id="order-type-input" required ng-model="riskEventEdit.order_type"
id="order-type-input"
required
ng-options="key as value for (key, value) in orderTypes"> ng-options="key as value for (key, value) in orderTypes">
<option value="">Please Choose</option> <option value="">Please Choose</option>
</select> </select>
<div ng-messages="riskEventForm.order_type.$error" <div ng-messages="riskEventForm.order_type.$error"
ng-if="riskEventForm.order_type.$dirty"> ng-if="riskEventForm.order_type.$dirty">
<p class="small text-danger" ng-message="required"> <p class="small text-danger"
required field ng-message="required">required field
</p> </p>
</div> </div>
</div> </div>
@ -165,29 +198,38 @@
<div class="form-group" <div class="form-group"
ng-class="{'has-error':riskEventForm.order_ids.$invalid && riskEventForm.order_ids.$dirty}"> ng-class="{'has-error':riskEventForm.order_ids.$invalid && riskEventForm.order_ids.$dirty}">
<label class="control-label col-sm-2" for="order-ids-input">Order IDs</label> <label class="control-label col-sm-2"
for="order-ids-input">Order IDs
</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="riskEvent.order_ids" type="text" <input class="form-control"
ng-model="riskEventEdit.order_ids"
type="text"
name="order_ids" name="order_ids"
id="order-ids-input" id="order-ids-input"
required> required>
<div ng-messages="riskEventForm.order_ids.$error" <div ng-messages="riskEventForm.order_ids.$error"
ng-if="riskEventForm.order_ids.$dirty"> ng-if="riskEventForm.order_ids.$dirty">
<p class="small text-danger" ng-message="required"> <p class="small text-danger"
required field ng-message="required">required field
</p> </p>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" for="reply-deadline-input">Reply Deadline</label> <label class="control-label col-sm-2"
for="reply-deadline-input">Reply Deadline
</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div style="display: inline-block"> <div style="display: inline-block">
<input class="form-control" id="reply-deadline-input" <input class="form-control"
id="reply-deadline-input"
type="text" type="text"
ng-model="riskEvent.reply_email_date" ng-model="riskEventEdit.reply_email_date"
uib-datepicker-popup size="10" placeholder="Reply Deadline" uib-datepicker-popup
size="10"
placeholder="Reply Deadline"
is-open="replyDeadline.open" is-open="replyDeadline.open"
ng-click="replyDeadline.open=true" ng-click="replyDeadline.open=true"
datepicker-options="{minDate:today}"> datepicker-options="{minDate:today}">
@ -196,33 +238,32 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" for="description-input">Description</label> <label class="control-label col-sm-2"
for="description-input">Description
</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="riskEvent.description" type="text" <input class="form-control"
ng-model="riskEventEdit.description"
type="text"
name="description" name="description"
id="description-input"> id="description-input">
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="btn-group margin-bottom margin-top"> <div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" <button class="btn btn-success"
style="margin-right: 10px;" style="margin-right: 10px;"
type="button" type="button"
ng-click="save(riskEventForm)"> ng-click="save(riskEventForm)">Save
Save
</button> </button>
<button class="btn btn-warning" <button class="btn btn-warning"
type="button" type="button"
ng-click="changeEditFlag(editFlag)"> ng-click="changeEditFlag(editFlag)">cancel
cancel
</button> </button>
</div> </div>
</form> </form>

@ -6,17 +6,22 @@
<div class="box-header"> <div class="box-header">
<div class="form-inline"> <div class="form-inline">
<div class="form-group"> <div class="form-group">
<label class="control-label" for="partner-code-search">Partner Code</label> <label class="control-label"
<input type="text" class="form-control" id="partner-code-search" for="partner-code-search">Partner Code
ng-model="params.client_moniker"> </label>
<input type="text"
class="form-control"
id="partner-code-search"
ng-model="params.clientMoniker">
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label" for="order-type-input"> <label class="control-label"
Order Type for="order-type-input">Order Type
</label> </label>
<select class="form-control" name="order_type" <select class="form-control"
ng-model="params.order_type" name="order_type"
ng-model="params.orderType"
id="order-type-input" id="order-type-input"
ng-options="key as value for (key, value) in orderTypes"> ng-options="key as value for (key, value) in orderTypes">
<option value="">ALL</option> <option value="">ALL</option>
@ -24,28 +29,34 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<button class="btn btn-primary" type="button" ng-click="loadRiskEvents(1)"><i <label class="control-label"
class="fa fa-search"></i></button> for="order-ids-input">Order IDs
</label>
<input class="form-control"
ng-model="params.orderIds"
type="text"
name="order_ids"
id="order-ids-input">
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" for="order-ids-input">Order IDs</label> <button class="btn btn-primary"
<div class="col-sm-8"> type="button"
<input class="form-control" ng-model="params.order_ids" type="text" ng-click="loadRiskEvents(1)">
name="order_ids" <i class="fa fa-search"></i>
id="order-ids-input"> </button>
</div>
</div> </div>
<a role="button" class="btn btn-info pull-right" <a role="button"
ui-sref=".new_riskEvent" title="New Event"> class="btn btn-info pull-right"
<i class="fa fa-plus"></i> ui-sref=".new_riskEvent"
New Event title="New Event">
<i class="fa fa-plus"></i>New Event
</a> </a>
</div> </div>
</div> </div>
</div> </div>
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<h3 class="box-title">RiskEvent List</h3> <h3 class="box-title">RiskEvent List</h3>
@ -54,54 +65,43 @@
<div class="box-body no-padding table-responsive"> <div class="box-body no-padding table-responsive">
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Partner Code</th>
<th>Partner Code</th> <th>Order Type</th>
<th>Order Type</th> <th>Result Type</th>
<th>Result Type</th> <th>Sub Merchant ID</th>
<th>Sub Merchant ID</th> <th>Email Status</th>
<th>Email Status</th> <th>FillIn Person</th>
<th>FillIn Person</th> <th>Description</th>
<th>Description</th> <th>Create Time</th>
<th>Create Time</th> <th>Operation</th>
<th>Operation</th> </tr>
</tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="riskEvent in riskEvents"> <tr ng-repeat="riskEvent in riskEvents">
<td ng-bind="riskEvent.client_moniker"></td> <td ng-bind="riskEvent.client_moniker"></td>
<td> <td ng-bind="riskEvent.order_type | orderType"></td>
<span ng-if="riskEvent.order_type == 1">微信调单</span> <td ng-bind="riskEvent.result_type | resultType"></td>
<span ng-if="riskEvent.order_type == 2">支付宝调单</span> <td ng-bind="riskEvent.sub_merchant_id"></td>
<span ng-if="riskEvent.order_type == 3">RoyalPay调单</span> <td ng-bind="riskEvent.email_status | emailStatus"></td>
<span ng-if="riskEvent.order_type == 4">警告</span> <td ng-bind="riskEvent.fillin_person"></td>
<span ng-if="riskEvent.order_type == 5">通用号调单</span> <td ng-bind="riskEvent.description | limitTo:20"></td>
</td> <td ng-bind="riskEvent.create_time"></td>
<td> <td>
<span ng-if="riskEvent.result_type == 0">未处理</span> <a class="text-primary"
<span ng-if="riskEvent.result_type == 1">处理中</span> role="button"
<span ng-if="riskEvent.result_type == 2">已处理</span> title="Detail"
</td> ui-sref="analysis_monitoring.riskEvent_detail({risk_id:riskEvent.risk_id})">
<td ng-bind="riskEvent.sub_merchant_id"></td> <i class="fa fa-search"></i> Detail
<td> </a>
<span ng-if="riskEvent.email_status == 0">未发送</span> </td>
<span ng-if="riskEvent.email_status == 1">已发送</span> </tr>
</td>
<td ng-bind="riskEvent.fillin_person"></td>
<td ng-bind="riskEvent.description | limitTo:20"></td>
<td ng-bind="riskEvent.create_time"></td>
<td>
<a class="text-primary" role="button" title="Detail"
ui-sref="analysis_monitoring.riskEvent_detail({risk_id:riskEvent.risk_id})">
<i class="fa fa-search"></i> Detail
</a>
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="box-footer" ng-if="riskEvents.length">
<div class="box-footer"
ng-if="riskEvents.length">
<uib-pagination class="pagination" <uib-pagination class="pagination"
total-items="pagination.totalCount" total-items="pagination.totalCount"
boundary-links="true" boundary-links="true"
@ -112,17 +112,16 @@
previous-text="&lsaquo;" previous-text="&lsaquo;"
next-text="&rsaquo;" next-text="&rsaquo;"
first-text="&laquo;" first-text="&laquo;"
last-text="&raquo;"></uib-pagination> last-text="&raquo;">
</uib-pagination>
<div class="row"> <div class="row">
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}</div> <div class="col-xs-12">
Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
Loading…
Cancel
Save