From 46c30081c04191cfd44516f1253ab57b61eacabe Mon Sep 17 00:00:00 2001 From: wanggeng <450292408@qq.com> Date: Fri, 27 Aug 2021 17:46:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=BE=AE=E4=BF=A1=E5=85=AC?= =?UTF-8?q?=E4=BC=97=E5=8F=B7state=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manager/officialaccount/WechatOfficialAccountManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-common-wechat/src/main/java/com/cm/common/wechat/manager/officialaccount/WechatOfficialAccountManager.java b/cloud-common-wechat/src/main/java/com/cm/common/wechat/manager/officialaccount/WechatOfficialAccountManager.java index 28e41ea..16d71af 100644 --- a/cloud-common-wechat/src/main/java/com/cm/common/wechat/manager/officialaccount/WechatOfficialAccountManager.java +++ b/cloud-common-wechat/src/main/java/com/cm/common/wechat/manager/officialaccount/WechatOfficialAccountManager.java @@ -121,7 +121,7 @@ public class WechatOfficialAccountManager { * @param session */ public void setUserAccessToken(String code, String state, HttpSession session) throws Exception { - if (StringUtils.equals(state, wechatOfficialAccountProperties.getAuthorize().getState())) { + if (StringUtils.startsWith(state, wechatOfficialAccountProperties.getAuthorize().getState())) { WechatOfficialAccountAccessTokenForUser wechatOfficialAccountAccessTokenForUser = getUserAccessToken(code); WechatOfficialAccountUserInfo wechatOfficialAccountUserInfo = getUserInfo(wechatOfficialAccountAccessTokenForUser.getAccess_token(), wechatOfficialAccountAccessTokenForUser.getOpenid()); WechatOfficialAccountUser wechatOfficialAccountUser = new WechatOfficialAccountUser();