Skip to content

Commit

Permalink
#587 企业微信几个接口增加个人二维码字段
Browse files Browse the repository at this point in the history
  • Loading branch information
binarywang committed May 13, 2018
1 parent bdbd92b commit 7435f2d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class WxCpUser implements Serializable {
private Integer hideMobile;
private String englishName;
private String telephone;
private String qrCode;
private Boolean toInvite;

public void addExtAttr(String name, String value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ public class WxCpUserDetail {
private String mobile;
private String gender;
private String email;
@SerializedName("qr_code")
@SerializedName("qrCode")
private String qrCode;
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public WxCpUser deserialize(JsonElement json, Type typeOfT, JsonDeserializationC
user.setHideMobile(GsonHelper.getInteger(o, "hide_mobile"));
user.setEnglishName(GsonHelper.getString(o, "english_name"));
user.setTelephone(GsonHelper.getString(o, "telephone"));
user.setQrCode(GsonHelper.getString(o, "qr_code"));
user.setToInvite(GsonHelper.getBoolean(o, "to_invite"));

if (GsonHelper.isNotNull(o.get("extattr"))) {
Expand Down Expand Up @@ -113,6 +114,9 @@ public JsonElement serialize(WxCpUser user, Type typeOfSrc, JsonSerializationCon
if (user.getTelephone() != null) {
o.addProperty("telephone", user.getTelephone());
}
if (user.getQrCode() != null) {
o.addProperty("qr_code", user.getQrCode());
}
if (user.getToInvite() != null) {
o.addProperty("to_invite", user.getToInvite());
}
Expand Down

0 comments on commit 7435f2d

Please sign in to comment.