Skip to content

Commit

Permalink
个人信息缺少remark和groupId
Browse files Browse the repository at this point in the history
  • Loading branch information
dwandw committed Jul 11, 2015
1 parent 825393d commit d42e84b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -103,6 +105,19 @@ public void setSexId(Integer sexId) {
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);
}
Expand All @@ -121,6 +136,8 @@ public String toString() {
", headImgUrl='" + headImgUrl + '\'' +
", subscribeTime=" + subscribeTime +
", unionId='" + unionId + '\'' +
", remark='" + remark + '\'' +
", groupId='" + groupId + '\'' +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public WxMpUser deserialize(JsonElement json, Type typeOfT, JsonDeserializationC
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("男");
Expand Down

0 comments on commit d42e84b

Please sign in to comment.