From 293e633396c1d8b4591db6c359c7476b9a076ca6 Mon Sep 17 00:00:00 2001 From: kingyifan Date: Mon, 20 Nov 2023 14:02:57 +0800 Subject: [PATCH] =?UTF-8?q?fix=20bug=20=20is=5Fsnapshotuser=20=09=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E4=B8=BA=E5=BF=AB=E7=85=A7=E9=A1=B5=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E8=99=9A=E6=8B=9F=E8=B4=A6=E5=8F=B7=EF=BC=8C=E5=8F=AA=E5=9C=A8?= =?UTF-8?q?getAccessToken=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E5=9C=A8=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E3=80=82=E5=81=9A=E6=AD=A4?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../me/chanjar/weixin/common/bean/WxOAuth2UserInfo.java | 6 +----- .../weixin/common/bean/oauth2/WxOAuth2AccessToken.java | 4 +++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/WxOAuth2UserInfo.java b/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/WxOAuth2UserInfo.java index 63e568d3f4..906e9de2b1 100644 --- a/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/WxOAuth2UserInfo.java +++ b/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/WxOAuth2UserInfo.java @@ -58,11 +58,7 @@ public class WxOAuth2UserInfo implements Serializable { */ @SerializedName("privilege") private String[] privileges; - /** - * is_snapshotuser 是否为快照页模式虚拟账号,值为0时是普通用户,1时是虚拟帐号 - */ - @SerializedName("is_snapshotuser") - private Integer snapshotUser; + public static WxOAuth2UserInfo fromJson(String json) { return WxGsonBuilder.create().fromJson(json, WxOAuth2UserInfo.class); diff --git a/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/oauth2/WxOAuth2AccessToken.java b/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/oauth2/WxOAuth2AccessToken.java index 4faf9df375..c08a49063d 100644 --- a/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/oauth2/WxOAuth2AccessToken.java +++ b/weixin-java-common/src/main/java/me/chanjar/weixin/common/bean/oauth2/WxOAuth2AccessToken.java @@ -29,7 +29,9 @@ public class WxOAuth2AccessToken implements Serializable { @SerializedName("scope") private String scope; - + /** + * 是否为快照页模式虚拟账号,只有当用户是快照页模式虚拟账号时返回,值为1 + */ @SerializedName("is_snapshotuser") private Integer snapshotUser;