mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-30 01:58:23 +08:00
🎨 #1583 企业微信读取成员接口增加返回字段:main_department
Co-authored-by: laowang <wangzhengwei@chinaredstar.cn>
This commit is contained in:
@ -31,6 +31,7 @@ public class WxCpUser implements Serializable {
|
|||||||
private String email;
|
private String email;
|
||||||
private String avatar;
|
private String avatar;
|
||||||
private String thumbAvatar;
|
private String thumbAvatar;
|
||||||
|
private String mainDepartment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 地址。长度最大128个字符
|
* 地址。长度最大128个字符
|
||||||
|
|||||||
@ -74,6 +74,7 @@ public class WxCpUserGsonAdapter implements JsonDeserializer<WxCpUser>, JsonSeri
|
|||||||
user.setTelephone(GsonHelper.getString(o, "telephone"));
|
user.setTelephone(GsonHelper.getString(o, "telephone"));
|
||||||
user.setQrCode(GsonHelper.getString(o, "qr_code"));
|
user.setQrCode(GsonHelper.getString(o, "qr_code"));
|
||||||
user.setToInvite(GsonHelper.getBoolean(o, "to_invite"));
|
user.setToInvite(GsonHelper.getBoolean(o, "to_invite"));
|
||||||
|
user.setMainDepartment(GsonHelper.getString(o, "main_department"));
|
||||||
|
|
||||||
if (GsonHelper.isNotNull(o.get(EXTRA_ATTR))) {
|
if (GsonHelper.isNotNull(o.get(EXTRA_ATTR))) {
|
||||||
this.buildExtraAttrs(o, user);
|
this.buildExtraAttrs(o, user);
|
||||||
@ -243,6 +244,9 @@ public class WxCpUserGsonAdapter implements JsonDeserializer<WxCpUser>, JsonSeri
|
|||||||
if (user.getToInvite() != null) {
|
if (user.getToInvite() != null) {
|
||||||
o.addProperty("to_invite", user.getToInvite());
|
o.addProperty("to_invite", user.getToInvite());
|
||||||
}
|
}
|
||||||
|
if (user.getMainDepartment() != null) {
|
||||||
|
o.addProperty("main_department", user.getMainDepartment());
|
||||||
|
}
|
||||||
|
|
||||||
if (user.getExtAttrs().size() > 0) {
|
if (user.getExtAttrs().size() > 0) {
|
||||||
JsonArray attrsJsonArray = new JsonArray();
|
JsonArray attrsJsonArray = new JsonArray();
|
||||||
|
|||||||
Reference in New Issue
Block a user