From 889eb4c0e63c4daaf6e5f7f28ba3443408ed964c Mon Sep 17 00:00:00 2001 From: huangtianzheng Date: Tue, 1 Nov 2022 14:57:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=B0=B8=E4=B9=85?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E7=A0=81=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC=E5=A2=9E=E5=8A=A0state=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chanjar/weixin/cp/bean/WxCpTpPermanentCodeInfo.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPermanentCodeInfo.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPermanentCodeInfo.java index 7293ccf30..522e606a2 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPermanentCodeInfo.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/WxCpTpPermanentCodeInfo.java @@ -58,6 +58,15 @@ public class WxCpTpPermanentCodeInfo extends WxCpBaseResp { @SerializedName("edition_info") private EditionInfo editionInfo; + /** + * 安装应用时,扫码或者授权链接中带的state值。详见state说明 + * state说明: + * 目前会返回state包含以下几个场景。 + * (1)扫带参二维码授权代开发模版。 + */ + @SerializedName("state") + private String state; + /** * The type Auth corp info. */ -- Gitee From e5ae08b4beebe8580391199be155d7c15fa772a1 Mon Sep 17 00:00:00 2001 From: huangtianzheng Date: Wed, 2 Nov 2022 16:33:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BC=81=E5=BE=AEcorpId2?= =?UTF-8?q?OpenCorpId=E6=8E=A5=E5=8F=A3provider=5Faccess=5Ftoken=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=80=BC=E4=BC=A0=E9=80=92=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weixin/cp/tp/service/impl/BaseWxCpTpServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/BaseWxCpTpServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/BaseWxCpTpServiceImpl.java index 2e3f08633..3faa718cd 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/BaseWxCpTpServiceImpl.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/BaseWxCpTpServiceImpl.java @@ -669,7 +669,7 @@ public abstract class BaseWxCpTpServiceImpl implements WxCpTpService, Requ public WxCpTpCorpId2OpenCorpId corpId2OpenCorpId(String corpId) throws WxErrorException { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("corpid", corpId); - String result = post(configStorage.getApiUrl(CORPID_TO_OPENCORPID) +"?provider_access_token=" + this.configStorage.getAccessToken(corpId), jsonObject.toString()); + String result = post(configStorage.getApiUrl(CORPID_TO_OPENCORPID) +"?provider_access_token=" + getWxCpProviderToken(), jsonObject.toString()); return WxCpTpCorpId2OpenCorpId.fromJson(result); } -- Gitee