mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-02-16 21:36:27 +08:00
🎨 #2660 【开放平台】补全获取授权帐号详情接口部分缺失参数
This commit is contained in:
@@ -43,6 +43,27 @@ public class WxOpenAuthorizerInfo implements Serializable {
|
||||
*/
|
||||
private MiniProgramInfo miniProgramInfo;
|
||||
|
||||
/**
|
||||
* 小程序注册方式
|
||||
* 类型 说明
|
||||
* 0 普通方式注册
|
||||
* 2 通过复用公众号创建小程序 api 注册
|
||||
* 6 通过法人扫脸创建企业小程序 api 注册
|
||||
* 13 通过创建试用小程序 api 注册
|
||||
* 15 通过联盟控制台注册
|
||||
* 16 通过创建个人小程序 api 注册
|
||||
* 17 通过创建个人交易小程序 api 注册
|
||||
* 19 通过试用小程序转正 api 注册
|
||||
* 22 通过复用商户号创建企业小程序 api 注册
|
||||
* 23 通过复用商户号转正 api 注册
|
||||
*/
|
||||
private Integer registerType;
|
||||
|
||||
/**
|
||||
* 小程序基础配置信息
|
||||
*/
|
||||
private BasicConfig basicConfig;
|
||||
|
||||
@Data
|
||||
public static class MiniProgramInfo implements Serializable {
|
||||
private static final long serialVersionUID = 8857028017332191988L;
|
||||
@@ -76,4 +97,13 @@ public class WxOpenAuthorizerInfo implements Serializable {
|
||||
private List<String> bizDomain;
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class BasicConfig implements Serializable {
|
||||
private static final long serialVersionUID = -8857028017332191989L;
|
||||
@SerializedName("is_phone_configured")
|
||||
private Boolean isPhoneConfigured;
|
||||
@SerializedName("is_email_configured")
|
||||
private Boolean isEmailConfigured;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ public class WxOpenAuthorizerInfoGsonAdapter implements JsonDeserializer<WxOpenA
|
||||
private static final String VERIFY_TYPE_INFO = "verify_type_info";
|
||||
private static final String SERVICE_TYPE_INFO = "service_type_info";
|
||||
private static final String MINI_PROGRAM_INFO = "MiniProgramInfo";
|
||||
private static final String BASIC_CONFIG = "basic_config";
|
||||
|
||||
@Override
|
||||
public WxOpenAuthorizerInfo deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
|
||||
@@ -30,7 +31,7 @@ public class WxOpenAuthorizerInfoGsonAdapter implements JsonDeserializer<WxOpenA
|
||||
authorizationInfo.setQrcodeUrl(GsonHelper.getString(jsonObject, "qrcode_url"));
|
||||
authorizationInfo.setAccountStatus(GsonHelper.getInteger(jsonObject, "account_status"));
|
||||
authorizationInfo.setSignature(GsonHelper.getString(jsonObject, "signature"));
|
||||
authorizationInfo.setAccountStatus(GsonHelper.getInteger(jsonObject, "account_status"));
|
||||
authorizationInfo.setRegisterType(GsonHelper.getInteger(jsonObject, "register_type"));
|
||||
|
||||
if (jsonObject.has(SERVICE_TYPE_INFO)) {
|
||||
authorizationInfo.setServiceTypeInfo(GsonHelper.getInteger(jsonObject.getAsJsonObject(SERVICE_TYPE_INFO), "id"));
|
||||
@@ -38,6 +39,11 @@ public class WxOpenAuthorizerInfoGsonAdapter implements JsonDeserializer<WxOpenA
|
||||
if (jsonObject.has(VERIFY_TYPE_INFO)) {
|
||||
authorizationInfo.setVerifyTypeInfo(GsonHelper.getInteger(jsonObject.getAsJsonObject(VERIFY_TYPE_INFO), "id"));
|
||||
}
|
||||
if(jsonObject.has(BASIC_CONFIG)){
|
||||
authorizationInfo.setBasicConfig(WxOpenGsonBuilder.create().fromJson(jsonObject.get(BASIC_CONFIG),
|
||||
new TypeToken<WxOpenAuthorizerInfo.BasicConfig>(){
|
||||
}.getType()));
|
||||
}
|
||||
Map<String, Integer> businessInfo = WxOpenGsonBuilder.create().fromJson(jsonObject.get("business_info"),
|
||||
new TypeToken<Map<String, Integer>>() {
|
||||
}.getType());
|
||||
|
||||
Reference in New Issue
Block a user