email update

master
james.zhao 6 years ago
parent 50aae1323a
commit 799cc6da48

@ -28,7 +28,7 @@ public class AfterPaymentFinishListener implements ApplicationListener<AfterPaym
@Override
public void onApplicationEvent(AfterPaymentFinishEvent event) {
JSONObject order = event.getFinishedEvent().getOrder();
if(!"hf".equals(order.getString("channel"))||!"Yeepay".equals(order.getString("channel"))){
if(!"hf".equals(order.getString("channel"))&&!"Yeepay".equals(order.getString("channel"))){
return;
}
switch (order.getString("channel")){

@ -3,4 +3,4 @@ spring.datasource.schema-name=royalpay_production
spring.datasource.host=192.168.0.111:3306
spring.datasource.url=jdbc:mysql://${spring.datasource.host}/${spring.datasource.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.password=root

@ -56,7 +56,7 @@ app.agreetemplate.classic.path=https://file.royalpay.com.au/open/2017/07/10/1499
#app.agreetemplate.aggregate.path=https://file.royalpay.com.au/open/2017/11/10/1510280089107_D7CMUz4S1iwBI9IPj5P6ItkiGClmPK.pdf
app.agreetemplate.aggregate.path=https://file.royalpay.com.au/open/2017/11/17/1510890355946_hQt6yGc0NJ8TYeK7XCuuSAnTI31M7v.pdf
app.host.main=https://mpay.royalpay.com.au/
app.host.main=http://192.168.0.85:9002/
app.host.regions.cn=https://mpay-cn.royalpay.com.au/
app.host.regions.au=https://mpay-au.royalpay.com.au/
app.debug=true
@ -88,6 +88,7 @@ app.mail.host=https://mailsupport.royalpay.com.au
mail.send.credentialCode=Fd1aRfdjc9
apple.message.apns.password=F1b5*ChJPp73
apple.message.apns.file=/opt/adn
android.message.secret=2b96d9bc6169c9554218aab1
android.message.appkey=3f33a10d0a7d4ac94d8f2431

@ -110,12 +110,20 @@
AND sc.industry = #{industry}
</if>
<if test="receive_email_date != null">
AND re.receive_email_date = #{receive_email_date}
<if test="receive_email_date_begin != null">
AND re.receive_email_date &gt;= #{receive_email_date_begin}
</if>
<if test="reply_email_date != null">
AND re.reply_email_date = #{reply_email_date}
<if test="receive_email_date_end != null">
AND re.receive_email_date &lt;= #{receive_email_date_end}
</if>
<if test="reply_email_date_begin != null">
AND re.reply_email_date &gt;= #{reply_email_date_begin}
</if>
<if test="reply_email_date_end != null">
AND re.reply_email_date &lt;= #{reply_email_date_begin}
</if>
<if test="real_order_ids != null">
@ -123,4 +131,146 @@
</if>
</where>
</select>
</mapper>
<select id="analysisByIndustry" resultType="com.alibaba.fastjson.JSONObject">
SELECT
count(*) amount,
CASE sc.industry
WHEN 327
THEN '鞋包服饰'
WHEN 339
THEN '机票行业'
WHEN 356
THEN '软件服务'
WHEN 357
THEN '旅游票务'
WHEN 358
THEN '国际租车'
WHEN 359
THEN '医疗服务(出国)'
WHEN 360
THEN '医疗服务(不出国)'
WHEN 361
THEN '留学教育(网络教育)'
WHEN 362
THEN '留学教育(一年及以下)'
WHEN 338
THEN '其它货物贸易行业'
WHEN 337
THEN '文具/办公用品'
WHEN 336
THEN '综合商城'
WHEN 328
THEN '酒店行业'
WHEN 329
THEN '教育行业'
WHEN 330
THEN '国际物流'
WHEN 332
THEN '数码电器'
WHEN 333
THEN '母婴'
WHEN 334
THEN '化妆品'
WHEN 335
THEN '食品'
WHEN 363
THEN '留学教育(一年以上)'
WHEN 331
THEN '其它服务行业'
WHEN null
THEN '未知行业'
END AS `industry`
FROM risk_event re
LEFT JOIN sys_clients sc
ON re.client_moniker = sc.client_moniker
<if test="start_amount != null || end_amount != null">
RIGHT JOIN(
SELECT distinct re.risk_id
FROM
risk_event re,
risk_event_help reh
<where>
reh.risk_event_help_id &lt; (LENGTH(re.order_amounts) - LENGTH(REPLACE(re.order_amounts, ',' , ''))) + 1
<if test="start_amount != null">
AND cast(SUBSTRING_INDEX(SUBSTRING_INDEX(order_amounts,',',reh.risk_event_help_id + 1),',',-1) as signed) &gt;= #{start_amount}
</if>
<if test="end_amount != null">
AND cast(SUBSTRING_INDEX(SUBSTRING_INDEX(order_amounts,',',reh.risk_event_help_id + 1),',',-1) as signed) &lt;= #{end_amount}
</if>
</where>
) temp
on re.risk_id = temp.risk_id
</if>
<where>
<if test="risk_id != null">
AND re.risk_id = #{risk_id}
</if>
<if test="client_moniker != null">
AND re.client_moniker = #{client_moniker}
</if>
<if test="is_send_client != null">
AND re.is_send_client = #{is_send_client}
</if>
<if test="order_types != null">
<foreach collection="order_types" item="order_type_item" open="and re.order_type in (" close=")" separator=",">
#{order_type_item}
</foreach>
</if>
<if test="order_type != null">
AND re.order_type = #{order_type}
</if>
<if test="result_types != null">
<foreach collection="result_types" item="result_type_item" open="AND re.result_type IN (" close=")" separator=",">
#{result_type_item}
</foreach>
</if>
<if test="result_type != null">
AND re.result_type = #{result_type}
</if>
<if test="order_ids != null">
AND re.order_ids LIKE CONCAT('%', #{order_ids}, '%')
</if>
<if test="sub_merchant_id != null">
AND sc.sub_merchant_id = #{sub_merchant_id}
</if>
<if test="industry != null">
AND sc.industry = #{industry}
</if>
<if test="receive_email_date_begin != null">
AND re.receive_email_date &gt;= #{receive_email_date_begin}
</if>
<if test="receive_email_date_end != null">
AND re.receive_email_date &lt;= #{receive_email_date_end}
</if>
<if test="reply_email_date_begin != null">
AND re.reply_email_date &gt;= #{reply_email_date_begin}
</if>
<if test="reply_email_date_end != null">
AND re.reply_email_date &lt;= #{reply_email_date_begin}
</if>
<if test="real_order_ids != null">
AND re.real_order_ids = #{real_order_ids}
</if>
</where>
GROUP BY sc.industry
</select>
<!--<select id="analysisByAmount" resultType="com.alibaba.fastjson.JSONObject">-->
<!--</select>-->
</mapper>

@ -128,8 +128,8 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
}]);
app.controller('riskBusinessCtrl', ['$scope', '$state', '$http', '$uibModal', '$filter', 'commonDialog', 'industryMap',
function ($scope, $state, $http, $uibModal, $filter, commonDialog, industryMap) {
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;
$scope.resultTypes = resultTypesMap;
@ -139,13 +139,20 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.amountSection = amountSectionMap;
$scope.pagination = {};
$scope.params = {};
var industries = new Array();
angular.forEach($scope.industries, function (industry) {
industries.push(industry.label);
});
industries.push('未知行业');
console.log(industries);
// 加载风险注册事件
$scope.loadRiskEvents = function (page) {
var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1;
params.replyEmailDate = $filter('date')(params.replyEmailDate, 'yyyy-MM-dd');
params.receiveEmailDate = $filter('date')(params.receiveEmailDate, 'yyyy-MM-dd');
params.replyEmailDateBegin = $filter('date')(params.replyEmailDateBegin, 'yyyy-MM-dd');
params.replyEmailDateEnd = $filter('date')(params.replyEmailDateEnd, 'yyyy-MM-dd');
params.receiveEmailDateBegin = $filter('date')(params.receiveEmailDateBegin, 'yyyy-MM-dd');
params.receiveEmailDateEnd = $filter('date')(params.receiveEmailDateEnd, 'yyyy-MM-dd');
if (params.section != null) {
var sectionArray = params.section.split('-');
params.startAmount = sectionArray[0];
@ -155,6 +162,54 @@ define(['angular', 'jquery', 'uiRouter', './monitoring/analysis-monitoring'],
$scope.riskEvents = resp.data.data;
$scope.pagination = resp.data.pagination;
});
$http.get('/risk/business/events/analysis/industry', {params: params}).then(function (resp) {
$scope.riskEventsByIndustry = resp.data;
$scope.risk_industry_chart = chartParser.parse(industryAmount(industries),$scope.riskEventsByIndustry);
});
};
var industryAmount = function (industries) {
return {
chart: {
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b} : {c}"
},
// color: colors,
legend: {
orient: 'vertical',
left: 'right',
data: industries
}
},
series: [{
basic: {
name: '风控事件单量', type: 'pie',
radius: '80%',
center: ['50%', '60%'],
label:{ //饼图图形上的文本标签
normal:{
show:true,
position:'outer', //标签的位置
textStyle : {
fontWeight : 300 ,
fontSize : 16 //文字的字体大小
},
formatter:'{d}%'
}
},
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
},
column: {key: 'amount', name: 'industry'}
}]
}
};
$scope.loadRiskEvents(1);

@ -108,39 +108,75 @@
<!--Receive Email Date-->
<div class="form-group col-sm-6">
<label class="control-label col-xs-4 col-sm-4"
for="receive-date-input">Receive Date
<label class="control-label col-xs-4 col-sm-4">
Receive Date
</label>
<div class="col-xs-6">
<input class="form-control"
id="receive-date-input"
type="text"
ng-model="params.receiveEmailDate"
uib-datepicker-popup
size="10"
placeholder="Receive Email Date"
datepicker-options="{maxDate:today}"
is-open="ReceiveDate.open"
ng-click="ReceiveDate.open=true">
<div class="form-control-static form-inline">
<div class="col-xs-6">
<div style="display: inline-block">
<input class="form-control"
id="receive-date-begin-input"
type="text"
ng-model="params.receiveEmailDateBegin"
uib-datepicker-popup
size="10"
placeholder="From"
datepicker-options="{maxDate:params.receiveEmailDateEnd}"
is-open="receiveEmailDateBegin.open"
ng-click="receiveEmailDateBegin.open=true"></div>
~
<div style="display: inline-block">
<input class="form-control"
id="receive-date-end-input"
type="text"
ng-model="params.receiveEmailDateEnd"
uib-datepicker-popup
size="10"
placeholder="To"
datepicker-options="{minDate:params.receiveEmailDateBegin}"
is-open="receiveEmailDateEnd.open"
ng-click="receiveEmailDateEnd.open=true">
</div>
</div>
</div>
</div>
<!--Reply Email Deadline-->
<div class="form-group col-sm-6">
<label class="control-label col-xs-4 col-sm-4"
for="reply-deadline-input">Reply Deadline
<label class="control-label col-xs-4 col-sm-4">
Reply Deadline
</label>
<div class="col-xs-6">
<input class="form-control"
id="reply-deadline-input"
type="text"
ng-model="params.replyEmailDate"
uib-datepicker-popup
size="10"
placeholder="Reply Email Deadline"
is-open="ReplyDeadline.open"
ng-click="ReplyDeadline.open=true">
<div class="form-control-static form-inline">
<div class="col-xs-6">
<div style="display: inline-block">
<input class="form-control"
id="reply-deadline-begin-input"
type="text"
ng-model="params.replyEmailDateBegin"
uib-datepicker-popup
size="10"
placeholder="From"
is-open="replyEmailDateBegin.open"
datepicker-options="{maxDate:params.replyEmailDateEnd}"
ng-click="replyEmailDateBegin.open=true">
</div>
~
<div style="display: inline-block">
<input class="form-control"
id="reply-deadline-end-input"
type="text"
ng-model="params.replyEmailDateEnd"
uib-datepicker-popup
size="10"
placeholder="To"
is-open="replyEmailDateEnd.open"
datepicker-options="{minDate:params.replyEmailDateBegin}"
ng-click="replyEmailDateEnd.open=true">
</div>
</div>
</div>
</div>
<div class="form-group col-sm-6">
@ -256,6 +292,28 @@
</div>
</div>
</div>
<div class="box">
<div class="box-header">
<h3 class="box-title" style="display: inline-block; float: left;">RiskEvent Analysis</h3>
</div>
<div class="box-body no-padding table-responsive">
<div class="col-sm-6 col-xs-6">
<p class="text-center">行业占比</p>
<div class="chart" style="height: 400px" echarts="risk_industry_chart"
ng-class="{nodata:analysis.risk_industry_chart.nodata}"></div>
</div>
<div class="col-sm-6 col-xs-6">
<p class="text-center">金额分布</p>
<div class="chart" style="height: 250px" echarts="analysis.partners_type_chart"
ng-class="{nodata:analysis.partners_type_chart.nodata}"></div>
</div>
</div>
</div>
</div>
</div>
</div>

Loading…
Cancel
Save