新增卡券的客服消息类型

1. WxCardBuilder用于构建卡券的客服消息;
2. WxMpCustomMessage新作cardId字段及卡券builder;
3. CustomMessageGsonAdapter处理cardId序列化名字;
4. WxConsts新作WXCARD卡券类型。
This commit is contained in:
YuJian
2016-09-18 21:30:39 +08:00
parent 21f14971c1
commit ad71e3c0f3
4 changed files with 72 additions and 15 deletions

View File

@@ -75,6 +75,12 @@ public class WxMpCustomMessageGsonAdapter implements JsonSerializer<WxMpCustomMe
newsJsonObject.add("articles", articleJsonArray);
messageJson.add("news", newsJsonObject);
}
if (WxConsts.CUSTOM_MSG_WXCARD.equals(message.getMsgType())) {
JsonObject wxcard = new JsonObject();
wxcard.addProperty("card_id", message.getCardId());
messageJson.add("wxcard", wxcard);
}
if (StringUtils.isNotBlank(message.getKfAccount())){
JsonObject newsJsonObject = new JsonObject();