|
|
|
@ -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,6 +49,21 @@ public class NoticeRefundReviewListener implements ApplicationListener<NewRefund
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void sendOperatorNotify(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 = initMessageToOperator(event, operator.getString("display_name"), client, event.getRefundOrder(), templateId, wechatOpenid);
|
|
|
|
|
api.sendTemplateMessage(notice);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("Sending Notify failure", e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void sendRefundAuditNotify(NewRefundReviewEvent event, JSONObject client, JSONObject operator, String wechatOpenid) {
|
|
|
|
|
try {
|
|
|
|
|
MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(wechatOpenid);
|
|
|
|
|