44import java .lang .reflect .Type ;
55import java .util .List ;
66
7+ import org .apache .commons .lang3 .builder .ToStringBuilder ;
8+ import org .apache .commons .lang3 .builder .ToStringStyle ;
9+
710import com .google .gson .Gson ;
811import com .google .gson .JsonObject ;
912import com .google .gson .reflect .TypeToken ;
1720 */
1821public class WxMpUser implements Serializable {
1922
20- /**
21- * @fields serialVersionUID
22- */
2323 private static final long serialVersionUID = 5788154322646488738L ;
24- protected Boolean subscribe ;
25- protected String openId ;
26- protected String nickname ;
27- protected String sex ;
28- protected String language ;
29- protected String city ;
30- protected String province ;
31- protected String country ;
32- protected String headImgUrl ;
33- protected Long subscribeTime ;
34- protected String unionId ;
35- protected Integer sexId ;
36- protected String remark ;
37- protected Integer groupId ;
24+ private Boolean subscribe ;
25+ private String openId ;
26+ private String nickname ;
27+ private String sex ;
28+ private String language ;
29+ private String city ;
30+ private String province ;
31+ private String country ;
32+ private String headImgUrl ;
33+ private Long subscribeTime ;
34+ private String unionId ;
35+ private Integer sexId ;
36+ private String remark ;
37+ private Integer groupId ;
38+ private Integer [] tagIds ;
3839
3940 public Boolean getSubscribe () {
4041 return this .subscribe ;
4142 }
43+
4244 public Boolean isSubscribe () {
4345 return this .subscribe ;
4446 }
47+
4548 public void setSubscribe (Boolean subscribe ) {
4649 this .subscribe = subscribe ;
4750 }
51+
4852 public String getOpenId () {
4953 return this .openId ;
5054 }
55+
5156 public void setOpenId (String openId ) {
5257 this .openId = openId ;
5358 }
59+
5460 public String getNickname () {
5561 return this .nickname ;
5662 }
63+
5764 public void setNickname (String nickname ) {
5865 this .nickname = nickname ;
5966 }
67+
6068 public String getSex () {
6169 return this .sex ;
6270 }
71+
6372 public void setSex (String sex ) {
6473 this .sex = sex ;
6574 }
75+
6676 public String getLanguage () {
6777 return this .language ;
6878 }
79+
6980 public void setLanguage (String language ) {
7081 this .language = language ;
7182 }
83+
7284 public String getCity () {
7385 return this .city ;
7486 }
87+
7588 public void setCity (String city ) {
7689 this .city = city ;
7790 }
91+
7892 public String getProvince () {
7993 return this .province ;
8094 }
95+
8196 public void setProvince (String province ) {
8297 this .province = province ;
8398 }
99+
84100 public String getCountry () {
85101 return this .country ;
86102 }
103+
87104 public void setCountry (String country ) {
88105 this .country = country ;
89106 }
107+
90108 public String getHeadImgUrl () {
91109 return this .headImgUrl ;
92110 }
111+
93112 public void setHeadImgUrl (String headImgUrl ) {
94113 this .headImgUrl = headImgUrl ;
95114 }
115+
96116 public Long getSubscribeTime () {
97117 return this .subscribeTime ;
98118 }
119+
99120 public void setSubscribeTime (Long subscribeTime ) {
100121 this .subscribeTime = subscribeTime ;
101122 }
123+
102124 public String getUnionId () {
103125 return this .unionId ;
104126 }
127+
105128 public void setUnionId (String unionId ) {
106129 this .unionId = unionId ;
107130 }
@@ -118,43 +141,42 @@ public void setSexId(Integer sexId) {
118141 public String getRemark () {
119142 return this .remark ;
120143 }
144+
121145 public void setRemark (String remark ) {
122146 this .remark = remark ;
123147 }
148+
124149 public Integer getGroupId () {
125150 return this .groupId ;
126151 }
152+
127153 public void setGroupId (Integer groupId ) {
128154 this .groupId = groupId ;
129155 }
130156
157+ public Integer [] getTagIds () {
158+ return this .tagIds ;
159+ }
160+
161+ public void setTagIds (Integer [] tagIds ) {
162+ this .tagIds = tagIds ;
163+ }
164+
131165 public static WxMpUser fromJson (String json ) {
132166 return WxMpGsonBuilder .INSTANCE .create ().fromJson (json , WxMpUser .class );
133167 }
134168
135169 public static List <WxMpUser > fromJsonList (String json ) {
136- Type collectionType = new TypeToken <List <WxMpUser >>() {}.getType ();
170+ Type collectionType = new TypeToken <List <WxMpUser >>() {
171+ }.getType ();
137172 Gson gson = WxMpGsonBuilder .INSTANCE .create ();
138173 JsonObject jsonObject = gson .fromJson (json , JsonObject .class );
139174 return gson .fromJson (jsonObject .get ("user_info_list" ), collectionType );
140175 }
141176
142177 @ Override
143178 public String toString () {
144- return "WxMpUser{" +
145- "subscribe=" + this .subscribe +
146- ", openId='" + this .openId + '\'' +
147- ", nickname='" + this .nickname + '\'' +
148- ", sex='" + this .sex + '\'' +
149- ", language='" + this .language + '\'' +
150- ", city='" + this .city + '\'' +
151- ", province='" + this .province + '\'' +
152- ", country='" + this .country + '\'' +
153- ", headImgUrl='" + this .headImgUrl + '\'' +
154- ", subscribeTime=" + this .subscribeTime +
155- ", unionId='" + this .unionId + '\'' +
156- ", remark='" + this .remark + '\'' +
157- ", groupId='" + this .groupId + '\'' +
158- '}' ;
179+ return ToStringBuilder .reflectionToString (this , ToStringStyle .JSON_STYLE );
159180 }
181+
160182}
0 commit comments