Merge branch 'develop'

master
taylor.dang 6 years ago
commit 98a908a0b1

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

@ -34,12 +34,12 @@
<div class="weui_panel"> <div class="weui_panel">
<div class="weui_panel_bd"> <div class="weui_panel_bd">
<div class="weui_cells weui_cells_access"> <div class="weui_cells weui_cells_access">
<div th-each="apply: ${auditions}"> <div data-th-each="apply: ${auditions}">
<a class="weui_cell" th-href="/api/payment/v1.0/refund/auditions/ + @{apply.id}"> <a class="weui_cell" data-th-href="/api/payment/v1.0/refund/auditions/ + @{apply.id}">
<div class="weui_cell_bd weui_cell_primary"> <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>
<div class="weui_cell_ft" th-text="${apply.order_id}"></div> <div class="weui_cell_ft" data-th-text="${apply.order_id}"></div>
</a> </a>
</div> </div>
</div> </div>

Loading…
Cancel
Save