taylor.dang 6 years ago
parent b65f706555
commit 1383b71c69

@ -9,6 +9,7 @@ import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider;
import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;
@ -54,15 +55,14 @@ public class NoticeRefundAuditListener implements ApplicationListener<NewRefundA
for (JSONObject account : accounts) {
String wechatOpenid = account.getString("wechat_openid");
if (wechatOpenid == null) {
continue;
}
MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(wechatOpenid);
if (api != null) {
String templateId = api.getTemplateId("refund-audit-notice");
if (templateId != null) {
String templateId = api.getTemplateId("refund-audit-notice");
if (api != null && StringUtils.isNotEmpty(templateId)) {
try {
TemplateMessage notice = initMessage(newRefundAuditEvent, operatorName, remark, client, order, templateId, wechatOpenid);
api.sendTemplateMessage(notice);
} catch (Exception e) {
e.printStackTrace();
}
}

@ -34,12 +34,12 @@
<div class="weui_panel">
<div class="weui_panel_bd">
<div class="weui_cells weui_cells_access">
<div th-each="apply: ${auditions}">
<a class="weui_cell" th-href="/api/payment/v1.0/refund/auditions/ + @{apply.id}">
<div data-th-each="apply: ${auditions}">
<a class="weui_cell" data-th-href="/api/payment/v1.0/refund/auditions/ + @{apply.id}">
<div class="weui_cell_bd weui_cell_primary">
<p th-text="${apply.currency}+ ${#numbers.formatDecimal($apply.refund_fee,1,2)}"></p>
<p data-th-text="${apply.currency}+ ${#numbers.formatDecimal($apply.refund_fee,1,2)}"></p>
</div>
<div class="weui_cell_ft" th-text="${apply.order_id}"></div>
<div class="weui_cell_ft" data-th-text="${apply.order_id}"></div>
</a>
</div>
</div>

Loading…
Cancel
Save