3
3
import java .io .InputStream ;
4
4
import java .io .InputStreamReader ;
5
5
import java .io .Serializable ;
6
- import java .nio .charset .Charset ;
7
6
import java .util .ArrayList ;
8
7
import java .util .List ;
9
8
10
- import me .chanjar .weixin .common .util .json .WxGsonBuilder ;
11
9
import org .apache .commons .codec .Charsets ;
12
10
11
+ import me .chanjar .weixin .common .util .json .WxGsonBuilder ;
12
+
13
13
/**
14
14
* 企业号菜单
15
15
* @author Daniel Qian
@@ -19,6 +19,8 @@ public class WxMenu implements Serializable {
19
19
20
20
private List <WxMenuButton > buttons = new ArrayList <WxMenuButton >();
21
21
22
+ private WxMenuRule matchRule ;
23
+
22
24
public List <WxMenuButton > getButtons () {
23
25
return buttons ;
24
26
}
@@ -27,6 +29,14 @@ public void setButtons(List<WxMenuButton> buttons) {
27
29
this .buttons = buttons ;
28
30
}
29
31
32
+ public WxMenuRule getMatchRule () {
33
+ return matchRule ;
34
+ }
35
+
36
+ public void setMatchRule (WxMenuRule matchRule ) {
37
+ this .matchRule = matchRule ;
38
+ }
39
+
30
40
public String toJson () {
31
41
return WxGsonBuilder .create ().toJson (this );
32
42
}
@@ -118,5 +128,74 @@ public String toString() {
118
128
'}' ;
119
129
}
120
130
}
121
-
131
+
132
+ public static class WxMenuRule {
133
+ private String groupId ;
134
+ private String sex ;
135
+ private String country ;
136
+ private String province ;
137
+ private String city ;
138
+ private String clientPlatformType ;
139
+
140
+ public String getGroupId () {
141
+ return groupId ;
142
+ }
143
+
144
+ public void setGroupId (String groupId ) {
145
+ this .groupId = groupId ;
146
+ }
147
+
148
+ public String getSex () {
149
+ return sex ;
150
+ }
151
+
152
+ public void setSex (String sex ) {
153
+ this .sex = sex ;
154
+ }
155
+
156
+ public String getCountry () {
157
+ return country ;
158
+ }
159
+
160
+ public void setCountry (String country ) {
161
+ this .country = country ;
162
+ }
163
+
164
+ public String getProvince () {
165
+ return province ;
166
+ }
167
+
168
+ public void setProvince (String province ) {
169
+ this .province = province ;
170
+ }
171
+
172
+ public String getCity () {
173
+ return city ;
174
+ }
175
+
176
+ public void setCity (String city ) {
177
+ this .city = city ;
178
+ }
179
+
180
+ public String getClientPlatformType () {
181
+ return clientPlatformType ;
182
+ }
183
+
184
+ public void setClientPlatformType (String clientPlatformType ) {
185
+ this .clientPlatformType = clientPlatformType ;
186
+ }
187
+
188
+ @ Override
189
+ public String toString () {
190
+ return "matchrule:{" +
191
+ "group_id='" + groupId + '\'' +
192
+ ", sex='" + sex + '\'' +
193
+ ", country" + country + '\'' +
194
+ ", province" + province + '\'' +
195
+ ", city" + city + '\'' +
196
+ ", client_platform_type" + clientPlatformType + '\'' +
197
+ "}" ;
198
+ }
199
+ }
200
+
122
201
}
0 commit comments