添加对客服消息发送(点击跳转到图文消息页面) 图文消息的支持 #67

This commit is contained in:
Binary Wang
2016-10-25 15:04:58 +08:00
parent 11452e6de0
commit b23b76457c
7 changed files with 278 additions and 192 deletions

View File

@@ -75,6 +75,12 @@ public class WxMpKefuMessageGsonAdapter implements JsonSerializer<WxMpKefuMessag
messageJson.add("news", newsJsonObject);
}
if (WxConsts.CUSTOM_MSG_MPNEWS.equals(message.getMsgType())) {
JsonObject json = new JsonObject();
json.addProperty("media_id", message.getMpNewsMediaId());
messageJson.add("mpnews", json);
}
if (WxConsts.CUSTOM_MSG_WXCARD.equals(message.getMsgType())) {
JsonObject wxcard = new JsonObject();
wxcard.addProperty("card_id", message.getCardId());