diff --git a/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/result/WxMpUser.java b/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/result/WxMpUser.java index 5223e93e..29c6415f 100644 --- a/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/result/WxMpUser.java +++ b/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/result/WxMpUser.java @@ -23,6 +23,8 @@ public class WxMpUser implements Serializable { protected Long subscribeTime; protected String unionId; protected Integer sexId; + protected String remark; + protected Integer groupId; public Boolean getSubscribe() { return subscribe; @@ -103,6 +105,19 @@ public class WxMpUser implements Serializable { this.sexId = sexId; } + public String getRemark() { + return remark; + } + public void setRemark(String remark) { + this.remark = remark; + } + public Integer getGroupId() { + return groupId; + } + public void setGroupId(Integer groupId) { + this.groupId = groupId; + } + public static WxMpUser fromJson(String json) { return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpUser.class); } @@ -121,6 +136,8 @@ public class WxMpUser implements Serializable { ", headImgUrl='" + headImgUrl + '\'' + ", subscribeTime=" + subscribeTime + ", unionId='" + unionId + '\'' + + ", remark='" + remark + '\'' + + ", groupId='" + groupId + '\'' + '}'; } } diff --git a/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/util/json/WxMpUserGsonAdapter.java b/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/util/json/WxMpUserGsonAdapter.java index ba6caaac..9ffb41a0 100644 --- a/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/util/json/WxMpUserGsonAdapter.java +++ b/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/util/json/WxMpUserGsonAdapter.java @@ -30,6 +30,8 @@ public class WxMpUserGsonAdapter implements JsonDeserializer { wxMpUser.setSubscribeTime(GsonHelper.getLong(o, "subscribe_time")); wxMpUser.setUnionId(GsonHelper.getString(o, "unionid")); Integer sexId = GsonHelper.getInteger(o, "sex"); + wxMpUser.setRemark(GsonHelper.getString(o, "remark")); + wxMpUser.setGroupId(GsonHelper.getInteger(o, "groupid")); wxMpUser.setSexId(sexId); if(new Integer(1).equals(sexId)) { wxMpUser.setSex("男");