🐛 #2544 【公众号】修复菜单文章id未序列化问题

This commit is contained in:
zhoushuofu 2022-02-23 09:15:01 +08:00 committed by GitHub
parent 6c466f00b3
commit a25c48e3d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,7 @@ public class WxMenuGsonAdapter implements JsonSerializer<WxMenu>, JsonDeserializ
buttonJson.addProperty("key", button.getKey());
buttonJson.addProperty("url", button.getUrl());
buttonJson.addProperty("media_id", button.getMediaId());
buttonJson.addProperty("article_id", button.getArticleId());
buttonJson.addProperty("appid", button.getAppId());
buttonJson.addProperty("pagepath", button.getPagePath());
if (button.getSubButtons() != null && button.getSubButtons().size() > 0) {
@ -122,6 +123,7 @@ public class WxMenuGsonAdapter implements JsonSerializer<WxMenu>, JsonDeserializ
button.setUrl(GsonHelper.getString(json, "url"));
button.setType(GsonHelper.getString(json, "type"));
button.setMediaId(GsonHelper.getString(json, "media_id"));
button.setArticleId(GsonHelper.getString(json, "article_id"));
button.setAppId(GsonHelper.getString(json, "appid"));
button.setPagePath(GsonHelper.getString(json, "pagepath"));
return button;