From 47df91b1c5a323c91df8d34476b2a28a6c692948 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Sat, 28 Apr 2018 15:04:32 +0800 Subject: [PATCH] add manage web --- ....java => RiskMerchantDetailLogMapper.java} | 6 +- .../risk/RiskMerchantRecordMapper.java | 4 +- .../manage/risk/bean/AddRiskDetailLog.java | 44 ++++--- .../manage/risk/bean/QueryRiskDetail.java | 70 +++++++++++ .../manage/risk/core/RiskMerchantService.java | 5 + .../core/impl/RiskMerchantServiceImpl.java | 66 ++++++++-- .../manage/risk/web/RiskController.java | 17 ++- .../risk/RiskMerchantDetailLogMapper.xml | 17 +++ .../mappers/risk/RiskMerchantRecordMapper.xml | 1 + .../mappers/risk/RiskTransactionLogMapper.xml | 1 + src/main/ui/static/risk/risk.js | 114 +++++++++++++++--- src/main/ui/static/risk/templates/risk.html | 6 +- .../ui/static/risk/templates/risk_detail.html | 63 ++++++++++ .../ui/static/risk/templates/risk_edit.html | 1 + .../static/risk/templates/risk_history.html | 72 ++--------- .../ui/static/risk/templates/risk_orders.html | 21 +++- .../ui/static/risk/templates/risk_remark.html | 25 ++++ 17 files changed, 420 insertions(+), 113 deletions(-) rename src/main/java/au/com/royalpay/payment/manage/mappers/risk/{RiskMerchantDetalLogMapper.java => RiskMerchantDetailLogMapper.java} (68%) create mode 100644 src/main/java/au/com/royalpay/payment/manage/risk/bean/QueryRiskDetail.java create mode 100644 src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantDetailLogMapper.xml create mode 100644 src/main/ui/static/risk/templates/risk_detail.html create mode 100644 src/main/ui/static/risk/templates/risk_remark.html diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantDetalLogMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantDetailLogMapper.java similarity index 68% rename from src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantDetalLogMapper.java rename to src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantDetailLogMapper.java index b421b0d89..4c0db3b16 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantDetalLogMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantDetailLogMapper.java @@ -1,6 +1,8 @@ package au.com.royalpay.payment.manage.mappers.risk; import com.alibaba.fastjson.JSONObject; +import com.github.miemiedev.mybatis.paginator.domain.PageBounds; +import com.github.miemiedev.mybatis.paginator.domain.PageList; import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper; import cn.yixblog.support.mybatis.autosql.annotations.AutoSql; @@ -10,11 +12,13 @@ import cn.yixblog.support.mybatis.autosql.annotations.SqlType; * Create by yixian at 2017-12-21 11:45 */ @AutoMapper(tablename = "risk_merchant_detail_log", pkName = "id") -public interface RiskMerchantDetalLogMapper { +public interface RiskMerchantDetailLogMapper { @AutoSql(type = SqlType.INSERT) void save(JSONObject record); @AutoSql(type = SqlType.UPDATE) void update(JSONObject record); + PageList query(JSONObject params, PageBounds pagination); + } diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantRecordMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantRecordMapper.java index 1c14b9b0a..0aa2f7465 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantRecordMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantRecordMapper.java @@ -18,9 +18,9 @@ public interface RiskMerchantRecordMapper { @AutoSql(type = SqlType.UPDATE) void update(JSONObject record); - PageList query(JSONObject params, PageBounds pagination); - @AutoSql(type = SqlType.SELECT) JSONObject findById(@Param("id") String id); + PageList query(JSONObject params, PageBounds pagination); + } diff --git a/src/main/java/au/com/royalpay/payment/manage/risk/bean/AddRiskDetailLog.java b/src/main/java/au/com/royalpay/payment/manage/risk/bean/AddRiskDetailLog.java index 8b4f44e4a..2f787efd4 100644 --- a/src/main/java/au/com/royalpay/payment/manage/risk/bean/AddRiskDetailLog.java +++ b/src/main/java/au/com/royalpay/payment/manage/risk/bean/AddRiskDetailLog.java @@ -1,26 +1,40 @@ package au.com.royalpay.payment.manage.risk.bean; import com.alibaba.fastjson.JSONObject; +import com.fasterxml.jackson.annotation.JsonProperty; + +import org.apache.commons.lang3.StringUtils; public class AddRiskDetailLog { + @JsonProperty("record_id") private String record_id; - private int client_id; - + @JsonProperty("files") private String files; + @JsonProperty("operation") private String operation; - public JSONObject params(){ + @JsonProperty("remark") + private String remark; + + public JSONObject params() { JSONObject params = new JSONObject(); - params.put("record_id",this.record_id); - params.put("client_id",this.client_id); - params.put("files",this.files); - params.put("operation",this.operation); + params.put("record_id", this.record_id); + if (StringUtils.isNotEmpty(this.files)) { + params.put("files", this.files); + } + if (StringUtils.isNotEmpty(this.operation)) { + params.put("operation", this.operation); + } + if (StringUtils.isNotEmpty(this.remark)) { + params.put("remark", this.remark); + } return params; } + public String getRecord_id() { return record_id; } @@ -29,14 +43,6 @@ public class AddRiskDetailLog { this.record_id = record_id; } - public int getClient_id() { - return client_id; - } - - public void setClient_id(int client_id) { - this.client_id = client_id; - } - public String getFiles() { return files; } @@ -52,4 +58,12 @@ public class AddRiskDetailLog { public void setOperation(String operation) { this.operation = operation; } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } } diff --git a/src/main/java/au/com/royalpay/payment/manage/risk/bean/QueryRiskDetail.java b/src/main/java/au/com/royalpay/payment/manage/risk/bean/QueryRiskDetail.java new file mode 100644 index 000000000..1e4c07d57 --- /dev/null +++ b/src/main/java/au/com/royalpay/payment/manage/risk/bean/QueryRiskDetail.java @@ -0,0 +1,70 @@ +package au.com.royalpay.payment.manage.risk.bean; + +import com.alibaba.fastjson.JSONObject; + +import org.apache.commons.lang3.time.DateUtils; + +import java.text.ParseException; + +public class QueryRiskDetail { + + private String record_id; + private String c_end_time; + private int client_id; + + private int limit = 20; + private int page; + + public JSONObject toParams() { + JSONObject params = new JSONObject(); + params.put("record_id", this.record_id); + params.put("client_id", this.client_id); + try { + if (c_end_time != null) { + params.put("c_end_time", DateUtils.parseDate(this.c_end_time, new String[] { "yyyy-MM-dd HH:mm:ss" })); + } + } catch (ParseException e) { + } + return params; + } + + public String getRecord_id() { + return record_id; + } + + public void setRecord_id(String record_id) { + this.record_id = record_id; + } + + public String getC_end_time() { + return c_end_time; + } + + public void setC_end_time(String c_end_time) { + this.c_end_time = c_end_time; + } + + public int getClient_id() { + return client_id; + } + + public void setClient_id(int client_id) { + this.client_id = client_id; + } + + public int getLimit() { + return limit; + } + + public void setLimit(int limit) { + this.limit = limit; + } + + public int getPage() { + return page; + } + + public void setPage(int page) { + this.page = page; + } +} diff --git a/src/main/java/au/com/royalpay/payment/manage/risk/core/RiskMerchantService.java b/src/main/java/au/com/royalpay/payment/manage/risk/core/RiskMerchantService.java index 415dca96b..a8a2109af 100644 --- a/src/main/java/au/com/royalpay/payment/manage/risk/core/RiskMerchantService.java +++ b/src/main/java/au/com/royalpay/payment/manage/risk/core/RiskMerchantService.java @@ -2,6 +2,7 @@ package au.com.royalpay.payment.manage.risk.core; import au.com.royalpay.payment.manage.risk.bean.AddRiskDetailLog; import au.com.royalpay.payment.manage.risk.bean.DealRiskRecord; +import au.com.royalpay.payment.manage.risk.bean.QueryRiskDetail; import au.com.royalpay.payment.manage.risk.bean.QueryRiskOrder; import au.com.royalpay.payment.manage.risk.bean.QueryRiskRecord; @@ -17,6 +18,8 @@ public interface RiskMerchantService { void dealRiskRecord(JSONObject account,DealRiskRecord dealRiskRecord); + void dealRiskRecordDirectly(JSONObject account,String record_id); + JSONObject getRiskOrders(QueryRiskOrder queryRiskOrder); JSONObject getRiskRecords(QueryRiskRecord queryRiskRecord); @@ -27,6 +30,8 @@ public interface RiskMerchantService { JSONObject getRecordById(String record_id); + JSONObject getRiskDetails(QueryRiskDetail queryRiskDetail); + } diff --git a/src/main/java/au/com/royalpay/payment/manage/risk/core/impl/RiskMerchantServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/risk/core/impl/RiskMerchantServiceImpl.java index 0c541847b..2243b8368 100644 --- a/src/main/java/au/com/royalpay/payment/manage/risk/core/impl/RiskMerchantServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/risk/core/impl/RiskMerchantServiceImpl.java @@ -1,12 +1,13 @@ package au.com.royalpay.payment.manage.risk.core.impl; -import au.com.royalpay.payment.manage.mappers.risk.RiskMerchantDetalLogMapper; +import au.com.royalpay.payment.manage.mappers.risk.RiskMerchantDetailLogMapper; import au.com.royalpay.payment.manage.mappers.risk.RiskMerchantRecordMapper; import au.com.royalpay.payment.manage.mappers.risk.RiskTransactionLogMapper; import au.com.royalpay.payment.manage.mappers.risk.RiskWhiteListMapper; import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.risk.bean.AddRiskDetailLog; import au.com.royalpay.payment.manage.risk.bean.DealRiskRecord; +import au.com.royalpay.payment.manage.risk.bean.QueryRiskDetail; import au.com.royalpay.payment.manage.risk.bean.QueryRiskOrder; import au.com.royalpay.payment.manage.risk.bean.QueryRiskRecord; import au.com.royalpay.payment.manage.risk.core.RiskMerchantService; @@ -31,7 +32,7 @@ public class RiskMerchantServiceImpl implements RiskMerchantService { @Resource private RiskMerchantRecordMapper riskMerchantRecordMapper; @Resource - private RiskMerchantDetalLogMapper riskMerchantDetalLogMapper; + private RiskMerchantDetailLogMapper riskMerchantDetailLogMapper; @Resource private RiskTransactionLogMapper riskTransactionLogMapper; @Resource @@ -40,11 +41,23 @@ public class RiskMerchantServiceImpl implements RiskMerchantService { private ClientManager clientManager; @Override + @Transactional public void addDetailLog(AddRiskDetailLog addRiskDetailLog, JSONObject account) { - JSONObject record = addRiskDetailLog.params(); - record.put("auditor", account.getString("display_name")); - record.put("create_time", new Date()); - riskMerchantDetalLogMapper.save(record); + JSONObject record = riskMerchantRecordMapper.findById(addRiskDetailLog.getRecord_id()); + if (record == null) { + throw new NotFoundException("Risk Record Not Found Please Check"); + } + JSONObject detail = addRiskDetailLog.params(); + detail.put("auditor", account.getString("display_name")); + detail.put("client_id", record.getIntValue("client_id")); + detail.put("auditor_id", account.getString("manager_id")); + detail.put("create_time", new Date()); + riskMerchantDetailLogMapper.save(detail); + record.put("status", 2); + JSONObject recordUpdate = new JSONObject(); + recordUpdate.put("record_id", record.getString("record_id")); + recordUpdate.put("status", 2); + riskMerchantRecordMapper.update(recordUpdate); } @Override @@ -59,15 +72,16 @@ public class RiskMerchantServiceImpl implements RiskMerchantService { } JSONObject record = new JSONObject(); record.put("id", recordId); - record.put("status", "2"); + record.put("status", "1"); riskMerchantRecordMapper.update(record); JSONObject detail = new JSONObject(); detail.put("record_id", recordId); detail.put("client_id", riskRecord.getIntValue("client_id")); detail.put("auditor", account.getString("display_name")); + detail.put("auditor_id", account.getString("manager_id")); detail.put("operation", "进行掉单处理"); detail.put("create_time", new Date()); - riskMerchantDetalLogMapper.save(detail); + riskMerchantDetailLogMapper.save(detail); } @Override @@ -90,7 +104,7 @@ public class RiskMerchantServiceImpl implements RiskMerchantService { detail.put("auditor", account.getString("display_name")); detail.put("operation", "不做处理"); detail.put("create_time", new Date()); - riskMerchantDetalLogMapper.save(detail); + riskMerchantDetailLogMapper.save(detail); } @Override @@ -120,8 +134,31 @@ public class RiskMerchantServiceImpl implements RiskMerchantService { detail.put("auditor", account.getString("display_name")); detail.put("operation", StringUtils.isEmpty(operation) ? null : (operation = "处理结果:" + operation)); detail.put("create_time", new Date()); - riskMerchantDetalLogMapper.save(detail); - record.put("status", 1); + riskMerchantDetailLogMapper.save(detail); + record.put("status", 2); + riskMerchantRecordMapper.update(record); + } + + @Override + public void dealRiskRecordDirectly(JSONObject account, String record_id) { + JSONObject record = riskMerchantRecordMapper.findById(record_id); + if (record == null) { + throw new NotFoundException("Risk Record Not Found Please Check"); + } + if (record.getIntValue("status") != 0) { + throw new BadRequestException("The Record Has Been Handled"); + } + JSONObject detail = new JSONObject(); + detail.put("record_id", record_id); + detail.put("client_id", record.getIntValue("client_id")); + detail.put("auditor", account.getString("display_name")); + detail.put("auditor_id", account.getString("manager_id")); + detail.put("operation", "关结"); + detail.put("create_time", new Date()); + riskMerchantDetailLogMapper.save(detail); + JSONObject recordUpdate = new JSONObject(); + recordUpdate.put("record_id",record_id); + recordUpdate.put("status", 1); riskMerchantRecordMapper.update(record); } @@ -171,4 +208,11 @@ public class RiskMerchantServiceImpl implements RiskMerchantService { public JSONObject getRecordById(String record_id) { return riskMerchantRecordMapper.findById(record_id); } + + @Override + public JSONObject getRiskDetails(QueryRiskDetail queryRiskDetail) { + return PageListUtils.buildPageListResult( + riskMerchantDetailLogMapper.query(queryRiskDetail.toParams(), new PageBounds(queryRiskDetail.getPage(), queryRiskDetail.getLimit()))); + + } } diff --git a/src/main/java/au/com/royalpay/payment/manage/risk/web/RiskController.java b/src/main/java/au/com/royalpay/payment/manage/risk/web/RiskController.java index b857c3090..9fd4be497 100644 --- a/src/main/java/au/com/royalpay/payment/manage/risk/web/RiskController.java +++ b/src/main/java/au/com/royalpay/payment/manage/risk/web/RiskController.java @@ -3,6 +3,7 @@ package au.com.royalpay.payment.manage.risk.web; import au.com.royalpay.payment.manage.permission.manager.ManagerMapping; import au.com.royalpay.payment.manage.risk.bean.AddRiskDetailLog; import au.com.royalpay.payment.manage.risk.bean.DealRiskRecord; +import au.com.royalpay.payment.manage.risk.bean.QueryRiskDetail; import au.com.royalpay.payment.manage.risk.bean.QueryRiskOrder; import au.com.royalpay.payment.manage.risk.bean.QueryRiskRecord; import au.com.royalpay.payment.manage.risk.core.RiskMerchantService; @@ -49,6 +50,11 @@ public class RiskController { riskMerchantService.noopRiskRecord(manager, record_id); } + @RequestMapping(value = "/records/{record_id}/directly", method = RequestMethod.PUT) + public void directly(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String record_id) { + riskMerchantService.dealRiskRecordDirectly(manager, record_id); + } + @RequestMapping(value = "/records/{record_id}/deal",method = RequestMethod.PUT) public void dealRecord(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String record_id, @RequestBody DealRiskRecord dealRiskRecord){ dealRiskRecord.setRecordId(record_id); @@ -60,7 +66,6 @@ public class RiskController { return riskMerchantService.getRiskOrders(queryRiskOrder); } - @RequestMapping(value = "/white/{client_moniker}", method = RequestMethod.POST) public void addWhiteList(@PathVariable String client_moniker) { riskMerchantService.addWhiteList(client_moniker); @@ -76,4 +81,14 @@ public class RiskController { riskMerchantService.addDetailLog(addRiskDetailLog,manager); } + @RequestMapping(value = "/details", method = RequestMethod.GET) + public JSONObject listDetails(QueryRiskDetail queryRiskDetail) { + return riskMerchantService.getRiskDetails(queryRiskDetail); + } + + @RequestMapping(value = "/details/remark", method = RequestMethod.POST) + public void addDetailRemark(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,@RequestBody AddRiskDetailLog addRiskDetailLog ) { + riskMerchantService.addDetailLog(addRiskDetailLog,manager); + } + } diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantDetailLogMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantDetailLogMapper.xml new file mode 100644 index 000000000..282f8690c --- /dev/null +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantDetailLogMapper.xml @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantRecordMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantRecordMapper.xml index 67dceb727..2d8749648 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantRecordMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskMerchantRecordMapper.xml @@ -21,5 +21,6 @@ and client_id = #{client_id} + order by create_time desc \ No newline at end of file diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskTransactionLogMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskTransactionLogMapper.xml index d7f0bf1eb..b413d7bbd 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskTransactionLogMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/risk/RiskTransactionLogMapper.xml @@ -15,5 +15,6 @@ and create_time < #{c_end_time} + order by create_time desc \ No newline at end of file diff --git a/src/main/ui/static/risk/risk.js b/src/main/ui/static/risk/risk.js index 961565a57..c033d960e 100644 --- a/src/main/ui/static/risk/risk.js +++ b/src/main/ui/static/risk/risk.js @@ -2,8 +2,8 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS 'use strict'; var riskType = [ - {code: 1, label: 'test1'}, - {code: 2, label: 'test2'}, + {code: '1', label: 'test1'}, + {code: '2', label: 'test2'}, ]; var app = angular.module('RiskManagement', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload']); @@ -34,6 +34,17 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS }); }] } + }).state('analysis_monitoring.risk_detail', { + url: '/risk/{record_id}/detail', + templateUrl: '/static/risk/templates/risk_detail.html', + controller: 'RecordDetailCtrl', + resolve:{ + record:['$http','$stateParams', function ($http,$stateParams) { + return $http.get('/sys/risk/records/'+$stateParams.record_id).then(function (res) { + return res.data; + }); + }] + } }); }]); app.controller('RiskManageCtrl', ['$scope', '$http', function ($scope, $http){ @@ -68,7 +79,6 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS }; $scope.loadOrders(1); - $scope.loadHistoryOrders = function (page) { var historyParams = angular.copy($scope.historyParams); historyParams.page = page || $scope.historyPagination.page || 1; @@ -125,6 +135,74 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS } }]); + app.controller('RecordDetailCtrl', ['$scope', '$http','$uibModal', 'commonDialog','record', function ($scope, $http,$uibModal,commonDialog,record) { + $scope.record = record; + $scope.pagination = {}; + $scope.params = {record_id:record.id}; + $scope.listDetail = function (page) { + var params = angular.copy($scope.params); + params.page = page || $scope.pagination.page || 1; + $http.get('/sys/risk/details',{params:params}).then(function (res) { + $scope.details = res.data.data; + $scope.pagination = res.data.pagination; + }) + }; + $scope.listDetail(1); + + + $scope.addRemark = function () { + $uibModal.open({ + templateUrl: '/static/risk/templates/risk_remark.html', + controller: 'RiskDetailRemarkCtrl', + resolve:{record_id:function () { + return record.id; + }} + }).result.then(function () { + commonDialog.alert({ + title: 'Success', + type: 'success' + }); + }) + } + + $scope.dealDirectly = function () { + commonDialog.confirm({ + title: 'Confirm', + content: '确定关结这次预警?' + }).then(function () { + $http.put('/sys/risk/records/'+ record.id+'/directly').then(function () { + commonDialog.alert({ + title: 'Success', + type: 'Success' + }); + $scope.listDetail(1); + }).then(function (resp) { + commonDialog.alert({ + title: 'Error', + content: resp.data.message, + type: 'Error' + }); + }) + }) + } + }]); + + app.controller('RiskDetailRemarkCtrl', ['$scope', '$http','record_id','commonDialog', function ($scope, $http,record_id,commonDialog) { + $scope.addRemarkParams = {record_id:record_id}; + $scope.addRemark = function () { + var params = angular.copy($scope.addRemarkParams); + $http.post('/sys/risk/details/remark',params).then(function (res) { + $scope.$close(); + }).then(function (resp) { + commonDialog.alert({ + title: 'Error', + content: resp.data.message, + type: 'Error' + }); + }) + } + }]); + app.controller('RiskRecordHandleCtrl', ['$scope', '$http','record_id','commonDialog', function ($scope, $http,record_id,commonDialog) { $scope.params= {}; $scope.handle = function () { @@ -140,20 +218,26 @@ define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootS } }]); - - app.filter('risk_type', function (typeString) { - var sArr = typeString.split(","); - var result = ""; - angular.forEach(sArr, function (s) { + app.filter('risk_type', function () { + return function (riskStr) { angular.forEach(riskType,function (type) { - if (type==s){ - result+=type; - result+=","; - } + riskStr = riskStr.replace(type.code,type.label); }) - }); - result = result.substr(0,result.length-2); - return result; + return riskStr; + }; }); + app.filter('status_type', function () { + return function (riskStr) { + var statusResult = ''; + switch (riskStr){ + case('0'): statusResult = '待处理';break; + case('1'): statusResult = '已处理';break; + case('2'): statusResult = '处理中';break; + default: statusResult = ''; + } + return statusResult; + }; + }); + return app; }); \ No newline at end of file diff --git a/src/main/ui/static/risk/templates/risk.html b/src/main/ui/static/risk/templates/risk.html index 7253a7a99..f5cd1f7da 100644 --- a/src/main/ui/static/risk/templates/risk.html +++ b/src/main/ui/static/risk/templates/risk.html @@ -14,10 +14,10 @@ Client Moniker - Create Time + Create Timer Waring Time - Risk Types Status + Risk Types Risk Counts Operation @@ -27,7 +27,7 @@ {{record.client_moniker}} {{record.create_time}} {{record.expiry_time}} - {{record.status}} + {{record.status|status_type}} {{record.risk_types|risk_type}} {{record.risk_counts}} diff --git a/src/main/ui/static/risk/templates/risk_detail.html b/src/main/ui/static/risk/templates/risk_detail.html new file mode 100644 index 000000000..03e8d87f5 --- /dev/null +++ b/src/main/ui/static/risk/templates/risk_detail.html @@ -0,0 +1,63 @@ +
+
+

Risk Manager

+ +
+
+ +
+
Risk Details
+
+
+
+ + + + + + + + + + + + + + + + + +
Create Timeauditoroperationremark
{{record.create_time}}{{record.auditor}}{{record.operation}}{{record.remark}}
+ +
+
+ +
+
\ No newline at end of file diff --git a/src/main/ui/static/risk/templates/risk_edit.html b/src/main/ui/static/risk/templates/risk_edit.html index 14e2ce8c2..c6d99e4c3 100644 --- a/src/main/ui/static/risk/templates/risk_edit.html +++ b/src/main/ui/static/risk/templates/risk_edit.html @@ -19,6 +19,7 @@ Disable Merchant +
diff --git a/src/main/ui/static/risk/templates/risk_history.html b/src/main/ui/static/risk/templates/risk_history.html index 87a2f2468..2959e53f9 100644 --- a/src/main/ui/static/risk/templates/risk_history.html +++ b/src/main/ui/static/risk/templates/risk_history.html @@ -9,68 +9,22 @@
-
Record History
-
- - - - - - - - - - - - - - - - - - - - - - - -
Client MonikerCreate TimeWaring TimeRisk TypesStatusRisk CountsOperation
{{record.client_moniker}}{{record.create_time}}{{record.expiry_time}}{{record.status}}{{record.risk_types|risk_type}}{{record.risk_counts}} - - - - - - - -
- -
-
- - -
+
diff --git a/src/main/ui/static/risk/templates/risk_orders.html b/src/main/ui/static/risk/templates/risk_orders.html index e4399d1d2..3e07bb71f 100644 --- a/src/main/ui/static/risk/templates/risk_orders.html +++ b/src/main/ui/static/risk/templates/risk_orders.html @@ -9,12 +9,17 @@
Reference Orders
@@ -25,6 +30,7 @@
+ @@ -33,6 +39,7 @@ + @@ -63,6 +70,7 @@ + @@ -71,6 +79,7 @@ + diff --git a/src/main/ui/static/risk/templates/risk_remark.html b/src/main/ui/static/risk/templates/risk_remark.html new file mode 100644 index 000000000..8a994ca79 --- /dev/null +++ b/src/main/ui/static/risk/templates/risk_remark.html @@ -0,0 +1,25 @@ +
+

Phone Top Up

+
+ +
+
+
+
+
+
+
+
+ + +
+
+ +
+ +
+
+
+
+
+
Order Id Amount ChannelCreate Time Risk Types
{{order.order_id}} {{order.amount}} {{order.channel}}{{order.create_time}} {{order.risk_types|risk_type}}
Order Id Amount ChannelCreate Time Risk Types
{{order.order_id}} {{order.amount}} {{order.channel}}{{order.create_time}} {{order.risk_types|risk_type}}