master
hellolujian 6 years ago
parent 0abda9f48a
commit b069c37ea9

@ -25,6 +25,8 @@ public interface ClientBDMapper {
List<JSONObject> listClientBDInfoAvailable(@Param("client_id") int clientId, @Param("date") Date date);
List<JSONObject> listBDClientInfo(JSONObject param);
void updateClientDB(JSONObject jsonObject);
@AutoSql(type = SqlType.UPDATE)

@ -25,7 +25,7 @@ public interface RiskBusinessService {
* @param params
* @return
*/
JSONObject getRiskEventsByPage(JSONObject params);
JSONObject getRiskEventsByPage(JSONObject params, JSONObject manager);
/**
*

@ -29,7 +29,7 @@ import java.util.List;
* @Date 2018/10/10 1:12
*/
@RestController
@ManagerMapping(value = "/risk/business/", role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
@ManagerMapping(value = "/risk/business/", role = {ManagerRole.OPERATOR, ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.RISK_MANAGER})
public class RiskBusinessController {
@Autowired
@ -39,9 +39,9 @@ public class RiskBusinessController {
private ClientManager clientManager;
@GetMapping(value = "events")
public JSONObject getRiskEvents(RiskEventQuery riskEventQuery) {
public JSONObject getRiskEvents(RiskEventQuery riskEventQuery, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = riskEventQuery.toJSON();
return riskBusinessService.getRiskEventsByPage(params);
return riskBusinessService.getRiskEventsByPage(params, manager);
}
@GetMapping(value = "events/{risk_id}")

@ -45,4 +45,5 @@ public class RiskFileUploadController {
riskUploadService.submitMaterial(material);
riskUploadService.deleteUploadMailKey(codeKey);
}
}

@ -50,6 +50,10 @@
on re.risk_id = temp.risk_id
</if>
<if test="bd_id != null">
LEFT JOIN sys_client_bd scb
ON sc.client_id = scb.client_id
</if>
<where>
<if test="risk_id != null">
AND re.risk_id = #{risk_id}
@ -78,6 +82,9 @@
<if test="reply_email_date != null">
AND re.reply_email_date = #{reply_email_date}
</if>
<if test="bd_id != null">
AND scb.bd_id = #{bd_id}
</if>
</where>
</select>

@ -41,11 +41,29 @@
<![CDATA[
SELECT m.*
FROM sys_managers m
INNER JOIN sys_client_bd b ON b.bd_id = m.manager_id
WHERE client_id = #{client_id} AND start_date <= #{date} AND (end_date > #{date} OR end_date IS NULL) AND
b.is_valid = 1
INNER JOIN sys_client_bd b
ON b.bd_id = m.manager_id
WHERE client_id = #{client_id}
AND start_date <= #{date}
AND (end_date > #{date} OR end_date IS NULL)
AND b.is_valid = 1
]]>
</select>
<!--找出BD管理的商户-->
<select id="listBDClientInfo" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT sc.*
FROM sys_client_bd scb
INNER JOIN sys_clients sc
ON scb.client_id = sc.client_id
WHERE scb.bd_id = #{bd_id}
AND scb.start_date <= #{date}
AND (scb.end_date > #{date} OR scb.end_date IS NULL)
AND scb.is_valid = 1
]]>
</select>
<select id="findTheMaxBDCommissionEndDate" resultType="java.util.Date">
SELECT MAX(end_date)
FROM sys_client_bd

@ -83,6 +83,7 @@ todo.settlement.date_setting=Settle Dates configured are running out. Config new
todo.rate.expire_warning=Some clients' rate are expiring soon or expired. Please fix it as soon as possible.
todo.client.approve=Some clients are waiting for compliance.
todo.client.greenchannel=The data of Some clients in Green channel are waiting for committing.
todo.bd.order=The merchant managed by you is transferred. Please submit the materials as soon as possible.
app.message.title.payment=Payment Message
app.message.body.payment=You have received a payment of

@ -79,6 +79,7 @@ todo.settlement.date_setting=已配置清算日即将到期,请配置新的清
todo.rate.expire_warning=有商户费率即将到期或已过期,请尽快处理
todo.client.approve=有等待审核的商户
todo.client.greenchannel=有绿色通道商户等待提交资料
todo.bd.order=有商户被调单,请尽快提交材料
app.message.title.payment=到账通知
app.message.body.payment=您有一笔新的到账,

@ -83,6 +83,11 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
url: '/audit_material',
templateUrl: '/static/analysis/templates/audit_material.html',
controller: 'auditMaterialCtrl'
}).state('analysis_monitoring.riskEvent_detail.upload_material', {
url: '/upload_material',
templateUrl: '/static/analysis/templates/bd_upload_material.html',
cache: false,
controller: 'bdUploadMaterialCtrl'
});
}]);
@ -367,6 +372,162 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}
]);
app.controller('bdUploadMaterialCtrl', ['$scope','$http','Upload','$filter',function ($scope,$http,Upload,$filter) {
$scope.clientInfo = $scope.riskEvent.clientInfo;
$scope.material={};
$scope.material.update_time=$filter('date')(new Date(), 'yyyy-MM-dd HH:mm:ss');
$scope.uploadFile1 = function (files) {
if (files && files.length) {
var urls = new Array();
var value = 0;
$scope.file1Progress = {value: 0};
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: '/attachment/riskFiles',
data: {file: file}
}).then(function (resp) {
urls.push(resp.data.url);
}, function (resp) {
delete $scope.file1Progress;
alert('Upload Failed');
}, function (evt) {
value += parseInt(100 * evt.loaded / evt.total );
$scope.file1Progress.value = value/(files.length*2);
})
}
$scope.material.file1_url = urls;
}
};
$scope.uploadFile2 = function (files) {
if (files && files.length) {
var urls = new Array();
var value = 0;
$scope.file2Progress = {value: 0};
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: '/attachment/riskFiles',
data: {file: file}
}).then(function (resp) {
urls.push(resp.data.url);
}, function (resp) {
delete $scope.file2Progress;
alert('Upload Failed');
}, function (evt) {
value += parseInt(100 * evt.loaded / evt.total );
$scope.file2Progress.value = value/(files.length*2);
})
}
$scope.material.file2_url = urls;
}
};
$scope.uploadFile3 = function (files) {
if (files && files.length) {
var urls = new Array();
var value = 0;
$scope.file3Progress = {value: 0};
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: '/attachment/riskFiles',
data: {file: file}
}).then(function (resp) {
urls.push(resp.data.url);
}, function (resp) {
delete $scope.file3Progress;
alert('Upload Failed');
}, function (evt) {
value += parseInt(100 * evt.loaded / evt.total );
$scope.file3Progress.value = value/(files.length*2);
})
}
$scope.material.file3_url = urls;
}
};
$scope.uploadFile4 = function (files) {
if (files && files.length) {
var urls = new Array();
var value = 0;
$scope.file4Progress = {value: 0};
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: '/attachment/riskFiles',
data: {file: file}
}).then(function (resp) {
urls.push(resp.data.url);
}, function (resp) {
delete $scope.file4Progress;
alert('Upload Failed');
}, function (evt) {
value += parseInt(100 * evt.loaded / evt.total );
$scope.file4Progress.value = value/(files.length*2);
})
}
$scope.material.file4_url = urls;
}
};
$scope.uploadFile5 = function (files) {
if (files && files.length) {
var urls = new Array();
var value = 0;
$scope.file5Progress = {value: 0};
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: '/attachment/riskFiles',
data: {file: file}
}).then(function (resp) {
urls.push(resp.data.url);
}, function (resp) {
delete $scope.file5Progress;
alert('Upload Failed');
}, function (evt) {
value += parseInt(100 * evt.loaded / evt.total );
$scope.file5Progress.value = value/(files.length*2);
})
}
$scope.material.file5_url = urls;
}
};
$scope.uploadFile6 = function (files) {
if (files && files.length) {
var urls = new Array();
var value = 0;
$scope.file6Progress = {value: 0};
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: '/attachment/riskFiles',
data: {file: file}
}).then(function (resp) {
urls.push(resp.data.url);
}, function (resp) {
delete $scope.file6Progress;
alert('Upload Failed');
}, function (evt) {
value += parseInt(100 * evt.loaded / evt.total );
$scope.file6Progress.value = value/(files.length*2);
})
}
$scope.material.file6_url = urls;
}
};
$scope.submit = function (form) {
$http.post('/risk/upload/'+$scope.codeKey, $scope.material).then(function (resp) {
// commonDialog.alert({title: 'Success', content: 'Submit successfully', type: 'success'});
alert('Submit successfully');
window.location.href="/risk_upload_success.html";
}, function (resp) {
alert('Submit failed');
// commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
});
}
}]);
// 调单类型过滤器
app.filter('orderType', function() {
return function(type) {

@ -0,0 +1,203 @@
<div class="register-box-body register-box-bg">
<p class="login-box-msg">Easy BusinessEasy Payment</p>
<p class="small text-info">{{clientInfo.short_name}}</p>
<form novalidate name="uploadForm">
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">
1、物流公司发货单据照片
要求:每笔交易对应的物流单必须提供,且单据必须清晰可见<br>
Photos of logistics companies goods-delivery documents
Requirement: The logistics order record corresponding to each transaction must be provided,
and details of records should be clearly visible.
</p>
<p ng-if="riskEvent.order_type==3">
1.请解释相应的消费场景/业务模式,例如网站商城,扫码支付, 消费者到店支付等;<br>
Please explain the relative payment scenario/business activities,
for example, online store, QR code payment, payment at the store, etc;
</p>
</div>
<div class="col-sm-12">
<div class="col-xs-12">
<button class="btn btn-primary" type="button"
ngf-select="uploadFile1($files)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload
</button>
</div>
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<uib-progressbar value="file1Progress.value" type="success" animate="true" ng-if="file1Progress.value" max="100"
>{{file1Progress.value}}%</uib-progressbar>
<img class="col-xs-3 logo-width" ng-repeat="url in material.file1_url" ng-src="{{url}}">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">
2、用户购买虚拟物品需要提供聊天记录、订单信息、发货凭证截图、
虚拟物品最终消费场景(例如何种游戏、软件)、提供消费场景网址/下载链接
要求:每笔交易对应的截图必须清晰可见<br>
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.
Requirement: The screenshot corresponding to each transaction must be clearly visible.
</p>
<p ng-if="riskEvent.order_type==3">
2.提供相应购物清单,订单小票(请提供与被查交易订单号相匹配的交易时间及金额的发票);<br>
Provide related shopping lists, invoices.
(Please provide the invoices, amount of which matches that of the abnormal transaction);
</p>
</div>
<div class="col-sm-12">
<div class="col-xs-12">
<button class="btn btn-primary" type="button"
ngf-select="uploadFile2($files)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload
</button>
</div>
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<uib-progressbar value="file2Progress.value" type="success" animate="true" ng-if="file2Progress.value" max="100"
>{{file2Progress.value}}%</uib-progressbar>
<img class="col-xs-3 logo-width" ng-repeat="url in material.file2_url" ng-src="{{url}}">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">
3、购物小票/发票存根照片
照片应清晰,必须显示商户名称、商户地址、购物时间、物品名称
购物金额等<br>
Photos of shopping receipts/ invoice stubs
Requirement: The photos should be clear and must show Merchant name,
Business address, Transaction time, Product information, Quantity purchased, etc.
</p>
<p ng-if="riskEvent.order_type==3">
3.提供相应的发货证明,报关单(若有消费者在国内购买,请提供物流单据或报关单);<br>
Relative proof of delivery, customs declaration
(If the consumer purchased from China, please provide shipping receipt or customs declaration);
</p>
</div>
<div class="col-sm-12">
<div class="col-xs-12">
<button class="btn btn-primary" type="button"
ngf-select="uploadFile3($files)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload
</button>
</div>
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<uib-progressbar value="file3Progress.value" type="success" animate="true" ng-if="file3Progress.value" max="100"
>{{file3Progress.value}}%</uib-progressbar>
<img class="col-xs-3 logo-width" ng-repeat="url in material.file3_url" ng-src="{{url}}">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">
4、显示商户门牌号码和店头名称的照片
要求:清晰可见,至少一张<br>
Photos of Merchant Street number & Merchant name
Requirement: At least one visible photo
</p>
<p ng-if="riskEvent.order_type==3">
4.提供您的门店照片(门店照及店铺内的照片各一张, 一张可以看到商户名的门头照,一张可以看到相关商品或服务的店内照片);<br>
Photos of the store ( one of each front-store and in-store);
</p>
</div>
<div class="col-sm-12">
<div class="col-xs-12">
<button class="btn btn-primary" type="button"
ngf-select="uploadFile4($files)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload
</button>
</div>
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<uib-progressbar value="file4Progress.value" type="success" animate="true" ng-if="file4Progress.value" max="100"
>{{file4Progress.value}}%</uib-progressbar>
<img class="col-xs-3 logo-width" ng-repeat="url in material.file4_url" ng-src="{{url}}">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p ng-if="riskEvent.order_type==1">
5、显示商户营业场景所场内部情况如店内商品陈列、收银台等的照片
要求:照片清晰,且能清楚显示商户实际售卖物品或服务,至少三张<br>
Photos of internal environment of merchant business
(such as in-store merchandise display, checkout counter, etc.)
Requirements: The photos (at least three)
showing merchant activities including actual selling-goods or services obviously
</p>
<p ng-if="riskEvent.order_type==3">
5.其他可以还原交易背景的资料,如和消费者的聊天记录等,来佐证被查单号交易的真实性;<br>
Other materials that can verify the payment scenario, for example,
chatting history, to prove the truth of the transactions;
</p>
</div>
<div class="col-sm-12">
<div class="col-xs-12">
<button class="btn btn-primary" type="button"
ngf-select="uploadFile5($files)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload
</button>
</div>
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<uib-progressbar value="file5Progress.value" type="success" animate="true" ng-if="file5Progress.value" max="100"
>{{file5Progress.value}}%</uib-progressbar>
<img class="col-xs-3 logo-width" ng-repeat="url in material.file5_url" ng-src="{{url}}">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-12 text-left">
<p>6、其他图片<br>
Other pictures
</p>
</div>
<div class="col-sm-12">
<div class="col-xs-12">
<button class="btn btn-primary" type="button"
ngf-select="uploadFile6($files)" ngf-multiple="true">
<i class="fa fa-upload"></i> Upload
</button>
</div>
&nbsp;&nbsp;<br>
<div class="col-xs-12">
<uib-progressbar value="file6Progress.value" type="success" animate="true" ng-if="file6Progress.value" max="100"
>{{file6Progress.value}}%</uib-progressbar>
<img class="col-xs-3 logo-width" ng-repeat="url in material.file6_url" ng-src="{{url}}">
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Description</label>
<div class="col-sm-10">
<textarea class="form-control" required
ng-model="material.description" placeholder="No more than 500"
name="description"
maxlength="500"></textarea>
</div>
</div>
</div>
</div>
</form>
<div style="text-align: center">
<a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope" ng-disabled="!(material.description)"
ng-click="submit(uploadForm)">Submit</a>
</div>
</div>

@ -1,8 +1,4 @@
<div class="content">
<!--
<section class="content-header">
<h1>Risk Event</h1>
</section>-->
<div class="row">
<div class="col-sm-12">
<div class="nav-tabs-custom">
@ -10,16 +6,19 @@
<li ui-sref-active-eq="active">
<a ui-sref="analysis_monitoring.riskEvent_detail" ui-sref-opts="{reload:true}">Risk Detail</a>
</li>
<li ui-sref-active="active">
<li ui-sref-active="active" ng-if="'10'|withRole">
<a ui-sref=".audit_material" ui-sref-opts="{reload:true}">Audit material</a>
</li>
<li ui-sref-active="active" ng-if="('100'|withRole) && (riskEvent.result_type == 1 || riskEvent.result_type == 4)">
<a ui-sref=".upload_material" ui-sref-opts="{reload:true}">Upload Material</a>
</li>
</ul>
<div class="tab-content" ui-view>
<div class="row" ng-if="!editFlag">
<div class="col-sm-12">
<div class="nav-tabs-custom">
<div class="tab-content">
<div class="panel panel-default">
<div ng-if="'10'|withRole" class="panel panel-default">
<div class="panel-heading">
RiskEvent Basic Information
<a role="button"
@ -253,16 +252,25 @@
</div>
</div>
<a role="button"
ng-if="riskEvent.result_type <= 1 && riskEvent.order_type < 4"
class="btn btn-info"
ng-click="resendUploadEmail()">Send Email {{riskEvent.result_type == 1 ? 'again' : ''}}
</a>
<div ng-if="'10'|withRole">
<a role="button"
ng-if="riskEvent.result_type <= 1 && riskEvent.order_type < 4"
class="btn btn-info"
ng-click="resendUploadEmail()">Send Email {{riskEvent.result_type == 1 ? 'again' : ''}}
</a>
<a role="button"
ng-if="riskEvent.order_type == 4 && riskEvent.result_type == 0"
class="btn btn-info"
ng-click="resendUploadEmail()">Send Warning Email
</a>
</div>
<a role="button"
ng-if="riskEvent.order_type == 4 && riskEvent.result_type == 0"
ng-if="'100'|withRole"
class="btn btn-info"
ng-click="resendUploadEmail()">Send Warning Email
ui-sref=".upload_material">
Upload Material
</a>
<a role="button"

@ -44,7 +44,7 @@
</div>
-->
<div class="form-horizontal">
<div class="form-horizontal" ng-if="'10'|withRole">
<!--Partner Code-->
<div class="form-group col-sm-6">
<label class="control-label col-xs-4 col-sm-4"
@ -209,12 +209,12 @@
<tr>
<th>Partner Code</th>
<th>Order Type</th>
<th>Result Type</th>
<th ng-if="'10'|withRole">Result Type</th>
<th>Sub Merchant ID</th>
<th>Email Status</th>
<th>Risk Manager</th>
<th>Description</th>
<th>Create Time</th>
<th ng-if="'10'|withRole">Email Status</th>
<th ng-if="'10'|withRole">Risk Manager</th>
<th ng-if="'10'|withRole">Description</th>
<th ng-if="'10'|withRole">Create Time</th>
<th>Operation</th>
</tr>
</thead>
@ -222,14 +222,14 @@
<tr ng-repeat="riskEvent in riskEvents">
<td ng-bind="riskEvent.client_moniker"></td>
<td ng-bind="riskEvent.order_type | orderType"></td>
<td>
<td ng-if="'10'|withRole">
{{riskEvent.result_type | resultType}}
</td>
<td ng-bind="riskEvent.sub_merchant_id"></td>
<td ng-bind="riskEvent.email_status | emailStatus"></td>
<td ng-bind="riskEvent.fillin_person"></td>
<td ng-bind="riskEvent.description | limitTo:20"></td>
<td ng-bind="riskEvent.create_time"></td>
<td ng-if="'10'|withRole" ng-bind="riskEvent.email_status | emailStatus"></td>
<td ng-if="'10'|withRole" ng-bind="riskEvent.fillin_person"></td>
<td ng-if="'10'|withRole" ng-bind="riskEvent.description | limitTo:20"></td>
<td ng-if="'10'|withRole" ng-bind="riskEvent.create_time"></td>
<td>
<a class="text-primary"
role="button"

Loading…
Cancel
Save