Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class WxCpUser implements Serializable {
private Gender gender;
private String email;
private String avatar;
private String thumbAvatar;
/**
* 地址。长度最大128个字符
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public WxCpUser deserialize(JsonElement json, Type typeOfT, JsonDeserializationC
user.setGender(Gender.fromCode(GsonHelper.getString(o, "gender")));
user.setEmail(GsonHelper.getString(o, "email"));
user.setAvatar(GsonHelper.getString(o, "avatar"));
user.setThumbAvatar(GsonHelper.getString(o, "thumb_avatar"));
user.setAddress(GsonHelper.getString(o, "address"));
user.setAvatarMediaId(GsonHelper.getString(o, "avatar_mediaid"));
user.setStatus(GsonHelper.getInteger(o, "status"));
Expand Down Expand Up @@ -187,6 +188,9 @@ public JsonElement serialize(WxCpUser user, Type typeOfSrc, JsonSerializationCon
if (user.getAvatar() != null) {
o.addProperty("avatar", user.getAvatar());
}
if (user.getThumbAvatar() != null) {
o.addProperty("thumb_avatar", user.getThumbAvatar());
}
if (user.getAddress() != null) {
o.addProperty("address", user.getAddress());
}
Expand Down