Merge pull request #41 from mgcnrx11/feat-custom-msg-wxcard

新增卡券的客服消息类型
This commit is contained in:
Binary Wang
2016-09-21 14:45:50 +08:00
committed by GitHub
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();