mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 18:46:10 +08:00 
			
		
		
		
	#583 企业微信新增人员接口新增字段to_invite
This commit is contained in:
		| @ -31,6 +31,7 @@ public class WxCpUser implements Serializable { | ||||
|   private Integer hideMobile; | ||||
|   private String englishName; | ||||
|   private String telephone; | ||||
|   private Boolean toInvite; | ||||
|  | ||||
|   public void addExtAttr(String name, String value) { | ||||
|     this.extAttrs.add(new Attr(name, value)); | ||||
|  | ||||
| @ -49,6 +49,7 @@ public class WxCpUserGsonAdapter implements JsonDeserializer<WxCpUser>, JsonSeri | ||||
|     user.setHideMobile(GsonHelper.getInteger(o, "hide_mobile")); | ||||
|     user.setEnglishName(GsonHelper.getString(o, "english_name")); | ||||
|     user.setTelephone(GsonHelper.getString(o, "telephone")); | ||||
|     user.setToInvite(GsonHelper.getBoolean(o, "to_invite")); | ||||
|  | ||||
|     if (GsonHelper.isNotNull(o.get("extattr"))) { | ||||
|       JsonArray attrJsonElements = o.get("extattr").getAsJsonObject().get("attrs").getAsJsonArray(); | ||||
| @ -112,6 +113,10 @@ public class WxCpUserGsonAdapter implements JsonDeserializer<WxCpUser>, JsonSeri | ||||
|     if (user.getTelephone() != null) { | ||||
|       o.addProperty("telephone", user.getTelephone()); | ||||
|     } | ||||
|     if (user.getToInvite() != null) { | ||||
|       o.addProperty("to_invite", user.getToInvite()); | ||||
|     } | ||||
|  | ||||
|     if (user.getExtAttrs().size() > 0) { | ||||
|       JsonArray attrsJsonArray = new JsonArray(); | ||||
|       for (WxCpUser.Attr attr : user.getExtAttrs()) { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Binary Wang
					Binary Wang