mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 02:28:25 +08:00 
			
		
		
		
	#358 针对微信网页授权为snsapi_userinfo时,WxMpUser类中增加privilege字段
This commit is contained in:
		| @ -44,6 +44,10 @@ public class WxMpUser implements Serializable { | ||||
|   private String remark; | ||||
|   private Integer groupId; | ||||
|   private Long[] tagIds; | ||||
|   /** | ||||
|    * 用户特权信息,json 数组,如微信沃卡用户为(chinaunicom) | ||||
|    */ | ||||
|   private String[] privileges; | ||||
|  | ||||
|   public static WxMpUser fromJson(String json) { | ||||
|     return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpUser.class); | ||||
|  | ||||
| @ -37,6 +37,7 @@ public class WxMpUserGsonAdapter implements JsonDeserializer<WxMpUser> { | ||||
|     wxMpUser.setRemark(GsonHelper.getString(o, "remark")); | ||||
|     wxMpUser.setGroupId(GsonHelper.getInteger(o, "groupid")); | ||||
|     wxMpUser.setTagIds(GsonHelper.getLongArray(o, "tagid_list")); | ||||
|     wxMpUser.setPrivileges(GsonHelper.getStringArray(o, "privilege")); | ||||
|     wxMpUser.setSexId(sexId); | ||||
|     if (new Integer(1).equals(sexId)) { | ||||
|       wxMpUser.setSex("男"); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Binary Wang
					Binary Wang