🐛 #2908 【企业微信】修复用户接口直属领导参数没有被正常序列化的问题

This commit is contained in:
wangmeng3486 2023-01-09 13:47:29 +08:00 committed by GitHub
parent 521ea08ba9
commit 64e29af498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,6 +260,13 @@ public class WxCpUserGsonAdapter implements JsonDeserializer<WxCpUser>, JsonSeri
}
this.addProperty(o, "main_department", user.getMainDepartment());
if (user.getDirectLeader() != null && user.getDirectLeader().length > 0) {
JsonArray ary = new JsonArray();
for (String item : user.getDirectLeader()) {
ary.add(item);
}
o.add("direct_leader", ary);
}
if (!user.getExtAttrs().isEmpty()) {
JsonArray attrsJsonArray = new JsonArray();
for (Attr attr : user.getExtAttrs()) {