Merge remote-tracking branch 'origin/master'

master
eason.qian 7 years ago
commit df6cbe24ca

@ -38,7 +38,7 @@ public class NoticeRefundReviewListener implements ApplicationListener<NewRefund
//操作人模板消息
if (operator.getString("wechat_openid") != null || operator.getString("wx_openid") != null) {
String wechatOpenid = operator.getString("wechat_openid") != null ? operator.getString("wechat_openid") : operator.getString("wx_openid");
sendRefundAuditNotify(event, client, operator, wechatOpenid);
sendOperatorNotify(event, client, operator, wechatOpenid);
}
//风控团队接收
@ -49,7 +49,7 @@ public class NoticeRefundReviewListener implements ApplicationListener<NewRefund
}
}
private void sendRefundAuditNotify(NewRefundReviewEvent event, JSONObject client, JSONObject operator, String wechatOpenid) {
private void sendOperatorNotify(NewRefundReviewEvent event, JSONObject client, JSONObject operator, String wechatOpenid){
try {
MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(wechatOpenid);
if (api != null) {
@ -64,6 +64,21 @@ public class NoticeRefundReviewListener implements ApplicationListener<NewRefund
}
}
private void sendRefundAuditNotify(NewRefundReviewEvent event, JSONObject client, JSONObject operator, String wechatOpenid) {
try {
MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(wechatOpenid);
if (api != null) {
String templateId = api.getTemplateId("refund-audit-notice");
if (templateId != null) {
TemplateMessage notice = initMessage(event, operator.getString("display_name"), client, event.getRefundOrder(), templateId, wechatOpenid);
api.sendTemplateMessage(notice);
}
}
} catch (Exception e) {
logger.error("Sending Notify failure", e);
}
}
private TemplateMessage initMessage(NewRefundReviewEvent newRefundReviewEvent, String operatorName, JSONObject client, JSONObject review, String templateId, String wechatOpenid) {
String uri = "/api/payment/v1.0/refund/review/" + review.getString("review_id");
String loginUrl = PlatformEnvironment.getEnv().concatUrl("/global/userstatus/manager_signin_wechat") + "?target=" + uri;

@ -152,7 +152,7 @@
<div class="weui_cell_ft">
<select id="orgSelect">
<option value="">请选择机构</option>
<option th:each="org:${orgs}" th:value="${org}" th:utext="${org}"></option>
<option th:each="org:${orgs}" th:value="${org.org_id}" th:utext="${org.name}"></option>
</select>
</div>
</div>

@ -50,7 +50,7 @@
</style>
</head>
<body>
<div class="logo-box">
<div>
<div class="row">
<div th:if="${client.logo_url!=null} and ${client.logo_url!=''}">
<img data-th-src="@{${client['logo_url']}}" id="buslogo" class="logo" style="max-height: 120px;">

@ -0,0 +1,223 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<br>
<head>
<title>Refund Audition</title>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<link rel="stylesheet" type="text/css" href="/static/lib/weui/weui.min.css">
<script type="text/javascript" src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script>
##
<script type="text/javascript"
src="/static/templates/disable_wechat_menu.js?t=201607070231"></script>
<link rel="stylesheet" type="text/css" href="/static/lib/bootstrap/css/bootstrap.min.css">
<script type="text/javascript" src="/static/lib/bootstrap/js/bootstrap.min.js"></script>
<style type="text/css">
.weui_cell_ft {
max-width: 60%;
white-space: normal
}
</style>
<script type="text/javascript" data-th-inline="javascript">
$(document).ready(function () {
$('#agree-btn').click(function review() {
var wdiv = $('#wdiv');
wdiv.show();
var fee = /*[[*{review.amount}]]*/0;
var remark = /*[[*{review.remark}]]*/'';
$.ajax({
url: '/api/payment/v1.0/refund/review/orders/' + '${review.order_id}',
method: 'POST',
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify({fee: fee, original_number: true, remark: remark}),
success: function () {
location.reload();
},
error: function (jqXHR) {
wdiv.hide();
location.reload();
}
})
});
$('#disagree-btn').click(function review(pass) {
$('#cancelDialog').show()
});
$('#dialogCancelBtn').click(function () {
$('#cancelDialog').hide()
$('#cancelText').val().cleanData();
});
$('#dialogSubmitBtn').click(function () {
var wdiv = $('#wdiv');
wdiv.show();
var rev = /*[[*{review}]]*/null;
rev.description = $('#cancelText').val();
$.ajax({
url: '/api/payment/v1.0/refund/orders/offReview',
method: 'POST',
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify(rev),
success: function () {
location.reload();
},
error: function (jqXHR) {
wdiv.hide();
location.reload();
}
})
});
});
</script>
</head>
<br class="pp">
<div id="wdiv" class="weui_loading_toast" style="display:none;">
<div class="weui_mask_transparent"></div>
<div class="weui_toast">
<div class="weui_loading">
<div class="weui_loading_leaf weui_loading_leaf_0"></div>
<div class="weui_loading_leaf weui_loading_leaf_1"></div>
<div class="weui_loading_leaf weui_loading_leaf_2"></div>
<div class="weui_loading_leaf weui_loading_leaf_3"></div>
<div class="weui_loading_leaf weui_loading_leaf_4"></div>
<div class="weui_loading_leaf weui_loading_leaf_5"></div>
<div class="weui_loading_leaf weui_loading_leaf_6"></div>
<div class="weui_loading_leaf weui_loading_leaf_7"></div>
<div class="weui_loading_leaf weui_loading_leaf_8"></div>
<div class="weui_loading_leaf weui_loading_leaf_9"></div>
<div class="weui_loading_leaf weui_loading_leaf_10"></div>
<div class="weui_loading_leaf weui_loading_leaf_11"></div>
</div>
<p class="weui_toast_content">Submitting...</p>
</div>
</div>
<div id="cancelDialog" hidden>
<div class="weui_mask"></div>
<div class="weui_dialog">
<div class="weui_dialog_hd"><strong class="weui_dialog_title"
th:text="'拒绝('+${review.creation_by}+')的退款申请'"></strong>
</div>
<div class="weui_cells">
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>备注:</p>
</div>
<div class="weui_cell_ft"><input id="cancelText" class="form-control" type="text">
</div>
</div>
</div>
<div class="weui_dialog_ft">
<a id="dialogCancelBtn" class="weui_dialog_btn weui_dialog_btn_default">退出</a>
<a id="dialogSubmitBtn" class="weui_dialog_btn weui_dialog_btn_primary">提交</a>
</div>
</div>
</div>
<div class="container logo-box" align="center">
<div class="row">
<img src="/static/images/rp_logo.svg" id="buslogo" class="logo">
</div>
</div>
</br>
<div class="weui_cells_title" style="font-size: medium">Refund Info.</div>
<div class="weui_cells">
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Merchant Name</p>
</div>
<div class="weui_cell_ft"
th:text="${review.short_name} + '('+${review.client_moniker}+')'"></div>
</div>
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Avaliable Fee</p>
</div>
<div class="weui_cell_ft" th:text="${review.currency}+${review.available}"></div>
</div>
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Refund Fee</p>
</div>
<div class="weui_cell_ft" th:text="${review.currency}+${review.amount}"></div>
</div>
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Opeartor</p>
</div>
<div class="weui_cell_ft" th:text="${review.creation_by}"></div>
</div>
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Apply Time</p>
</div>
<div class="weui_cell_ft" th:text="${review.creation_date}"></div>
</div>
<div th:if="${review['remark']!=null}">
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Remark</p>
</div>
<div class="weui_cell_ft" th:text="${review.remark}"></div>
</div>
</div>
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Order ID</p>
</div>
<div class="weui_cell_ft" th:text="${review.order_id}"></div>
</div>
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Trade Time</p>
</div>
<div class="weui_cell_ft" th:text="${review.create_time}"></div>
</div>
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Follow BD</p>
</div>
<div class="weui_cell_ft" th:text="${review.bd_name}"></div>
</div>
</div>
</br>
<div th:if=" ${review.is_valid==1} and ${review.status == 1} ">
<div class="weui_cells_title" style="font-size: medium">Refund Auditon Status</div>
<div class="weui_cells">
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Status</p>
</div>
<div class="weui_cell_ft"
th:text="${review.last_update_by}+'审核通过,已提交至' + ${review.channel} +'处理'"></div>
</div>
</div>
</div>
<div th:if=" ${review.is_valid==0} and ${review.status == 0} ">
<div class="weui_cells_title" style="font-size: medium">Refund Auditon Status</div>
<div class="weui_cells">
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Status</p>
</div>
<div class="weui_cell_ft" th:text="${review.last_update_by}+'审核未通过'"></div>
</div>
<div th:if="${review['description']!=null}">
<div class="weui_cell">
<div class="weui_cell_bd weui_cell_primary">
<p>Remark</p>
</div>
<div class="weui_cell_ft" th:text="${review.description}"></div>
</div>
</div>
</div>
</div>
</br>
<div th:if="${review['status']==0} and ${review['is_valid'] == 1}">
<div class="weui_btn_area">
<a class="weui_btn weui_btn_primary" id="agree-btn">Agree</a>
<a class="weui_btn weui_btn_warn" id="disagree-btn">Disagree</a>
</div>
</div>
</div>
</body>
</html>

@ -46,7 +46,7 @@
</style>
</head>
<body>
<div class="logo-box">
<div>
<div class="row">
<div th:if="${client.logo_url!=null} and ${client.logo_url!=''}">
<img data-th-src="@{${client['logo_url']}}" id="buslogo" class="logo">

@ -4,11 +4,11 @@
$(function () {
'use strict';
document.querySelector('body').addEventListener('touchmove', function(e) {
if (!document.querySelector('.coupons').contains(e.target)) {
e.preventDefault();
}
});
// document.querySelector('body').addEventListener('touchmove', function(e) {
// if (!document.querySelector('.coupons').contains(e.target)) {
// e.preventDefault();
// }
// });
var dataCache = {price: '0', coupons: [], coupon_groups: {}};
var exchangeRate = 'CNY' == window.currency ? 1 : parseFloat(window.exchange_rate);
dataCache.paying = false;

Loading…
Cancel
Save