Skip to content

Commit a25c48e

Browse files
authored
🐛 #2544 【公众号】修复菜单文章id未序列化问题
1 parent 6c466f0 commit a25c48e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

weixin-java-common/src/main/java/me/chanjar/weixin/common/util/json/WxMenuGsonAdapter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ protected JsonObject convertToJson(WxMenuButton button) {
4646
buttonJson.addProperty("key", button.getKey());
4747
buttonJson.addProperty("url", button.getUrl());
4848
buttonJson.addProperty("media_id", button.getMediaId());
49+
buttonJson.addProperty("article_id", button.getArticleId());
4950
buttonJson.addProperty("appid", button.getAppId());
5051
buttonJson.addProperty("pagepath", button.getPagePath());
5152
if (button.getSubButtons() != null && button.getSubButtons().size() > 0) {
@@ -122,6 +123,7 @@ protected WxMenuButton convertFromJson(JsonObject json) {
122123
button.setUrl(GsonHelper.getString(json, "url"));
123124
button.setType(GsonHelper.getString(json, "type"));
124125
button.setMediaId(GsonHelper.getString(json, "media_id"));
126+
button.setArticleId(GsonHelper.getString(json, "article_id"));
125127
button.setAppId(GsonHelper.getString(json, "appid"));
126128
button.setPagePath(GsonHelper.getString(json, "pagepath"));
127129
return button;

0 commit comments

Comments
 (0)