mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 10:38:42 +08:00 
			
		
		
		
	#401 开放平台获取授权方的帐号基本信息返回对象增加MiniProgramInfo字段
This commit is contained in:
		| @ -3,6 +3,7 @@ package me.chanjar.weixin.open.bean.auth; | ||||
| import lombok.Data; | ||||
|  | ||||
| import java.io.Serializable; | ||||
| import java.util.List; | ||||
| import java.util.Map; | ||||
|  | ||||
| /** | ||||
| @ -21,4 +22,38 @@ public class WxOpenAuthorizerInfo implements Serializable { | ||||
|   private Map<String, Integer> businessInfo; | ||||
|   private String alias; | ||||
|   private String qrcodeUrl; | ||||
|  | ||||
|   /** | ||||
|    * 账号介绍 | ||||
|    */ | ||||
|   private String signature; | ||||
|  | ||||
|   /** | ||||
|    * 可根据这个字段判断是否为小程序类型授权 | ||||
|    */ | ||||
|   private MiniProgramInfo miniProgramInfo; | ||||
|  | ||||
|   @Data | ||||
|   public class MiniProgramInfo { | ||||
|     private Integer visitStatus; | ||||
|     /** | ||||
|      * 小程序已设置的各个服务器域名 | ||||
|      */ | ||||
|     private Network network; | ||||
|     private List<Category> categories; | ||||
|  | ||||
|     @Data | ||||
|     public class Category { | ||||
|       private String first; | ||||
|       private String second; | ||||
|     } | ||||
|  | ||||
|     @Data | ||||
|     public class Network { | ||||
|       private List<String> requestDomain; | ||||
|       private List<String> wsRequestDomain; | ||||
|       private List<String> uploadDomain; | ||||
|       private List<String> downloadDomain; | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
| @ -8,6 +8,8 @@ import me.chanjar.weixin.open.bean.auth.WxOpenAuthorizerInfo; | ||||
| import java.lang.reflect.Type; | ||||
| import java.util.Map; | ||||
|  | ||||
| import static me.chanjar.weixin.open.bean.auth.WxOpenAuthorizerInfo.*; | ||||
|  | ||||
| /** | ||||
|  * @author <a href="https://github.com/007gzs">007</a> | ||||
|  */ | ||||
| @ -33,6 +35,11 @@ public class WxOpenAuthorizerInfoGsonAdapter implements JsonDeserializer<WxOpenA | ||||
|       new TypeToken<Map<String, Integer>>() { | ||||
|       }.getType()); | ||||
|     authorizationInfo.setBusinessInfo(businessInfo); | ||||
|  | ||||
|     WxOpenAuthorizerInfo.MiniProgramInfo miniProgramInfo = WxOpenGsonBuilder.create().fromJson(jsonObject.get("miniProgramInfo"), | ||||
|       new TypeToken<WxOpenAuthorizerInfo.MiniProgramInfo>() { | ||||
|       }.getType()); | ||||
|     authorizationInfo.setMiniProgramInfo(miniProgramInfo); | ||||
|     return authorizationInfo; | ||||
|   } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Binary Wang
					Binary Wang