Skip to content

Commit 9d5f19c

Browse files
committed
修复菜单获取接口反序列化时subButtons为空的问题 #142
1 parent 5e72fb4 commit 9d5f19c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/menu/WxMenuButton.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package me.chanjar.weixin.common.bean.menu;
22

3+
import com.google.gson.annotations.SerializedName;
34
import me.chanjar.weixin.common.util.ToStringUtils;
45

56
import java.io.Serializable;
@@ -13,8 +14,11 @@ public class WxMenuButton implements Serializable {
1314
private String name;
1415
private String key;
1516
private String url;
17+
18+
@SerializedName("media_id")
1619
private String mediaId;
1720

21+
@SerializedName("sub_button")
1822
private List<WxMenuButton> subButtons = new ArrayList<>();
1923

2024
@Override

0 commit comments

Comments
 (0)