master
wangning 7 years ago
parent 0d7d2ade26
commit 3dfbfc9647

@ -7,7 +7,6 @@ import au.com.royalpay.payment.manage.tradelog.refund.events.NewRefundReviewEven
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi;
import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider; 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 com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@ -76,13 +75,13 @@ public class PostponeClientTask {
expiryClients.keySet().forEach(p -> { expiryClients.keySet().forEach(p -> {
List<JSONObject> adminAccounts = clientAccountMapper.listAdminAccounts(p); List<JSONObject> adminAccounts = clientAccountMapper.listAdminAccounts(p);
adminAccounts.forEach(o -> { adminAccounts.forEach(o -> {
sendPostponeNotify(o); sendClientPostponeNotify(o);
}); });
}); });
} }
private void sendPostponeNotify(JSONObject account) { private void sendClientPostponeNotify(JSONObject account) {
JSONObject client = clientManager.getClientInfo(account.getIntValue("client_id")); JSONObject client = clientManager.getClientInfo(account.getIntValue("client_id"));
try { try {
@ -100,11 +99,15 @@ public class PostponeClientTask {
} }
} }
private void sendComplianceNotify(Map<Integer,JSONObject> clients){
clients.values().forEach(p->{
});
}
private TemplateMessage initMessage(NewRefundReviewEvent newRefundReviewEvent, String operatorName, JSONObject client, JSONObject review, String templateId, private TemplateMessage initMessage(NewRefundReviewEvent newRefundReviewEvent, String operatorName, JSONObject client, JSONObject review, String templateId,
String wechatOpenid) { String wechatOpenid) {
String uri = "/api/payment/v1.0/refund/review/" + review.getString("review_id"); TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, "asd");
String loginUrl = PlatformEnvironment.getEnv().concatUrl("/global/userstatus/manager_signin_wechat") + "?target=" + uri;
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, loginUrl);
notice.put("first", operatorName + "提交了订单的退款申请,请审核", "#ff0000"); notice.put("first", operatorName + "提交了订单的退款申请,请审核", "#ff0000");
notice.put("keyword1", review.getString("currency") + newRefundReviewEvent.getRefundOrder().getDoubleValue("amount"), "#ff0000"); notice.put("keyword1", review.getString("currency") + newRefundReviewEvent.getRefundOrder().getDoubleValue("amount"), "#ff0000");
notice.put("keyword2", operatorName, "#0000ff"); notice.put("keyword2", operatorName, "#0000ff");

Loading…
Cancel
Save