From 88e346d2de8071a6e20fc4479b4e42fda571115f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=86=9B?= Date: Tue, 18 Oct 2022 22:42:59 +0800 Subject: [PATCH] =?UTF-8?q?fix=20[=20=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E6=9C=8D=E5=8A=A1=E8=B0=83=E7=94=A8?= =?UTF-8?q?getUserId=E6=8E=A5=E5=8F=A3=E6=97=B6=E7=BC=BA=E5=B0=91=20access?= =?UTF-8?q?=5Ftoken.=20issues=20#2799=20]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weixin/cp/tp/service/impl/WxCpTpUserServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpUserServiceImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpUserServiceImpl.java index c911250793..d992627468 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpUserServiceImpl.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/tp/service/impl/WxCpTpUserServiceImpl.java @@ -189,8 +189,8 @@ public String openid2UserId(String openid) throws WxErrorException { public String getUserId(String mobile, String corpId) throws WxErrorException { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("mobile", mobile); - String url = mainService.getWxCpTpConfigStorage().getApiUrl(GET_USER_ID); - url += "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId); + String url = mainService.getWxCpTpConfigStorage().getApiUrl(GET_USER_ID) + + "?access_token=" + mainService.getWxCpTpConfigStorage().getAccessToken(corpId); String responseContent = this.mainService.post(url, jsonObject.toString()); JsonObject tmpJsonElement = GsonParser.parse(responseContent); return tmpJsonElement.getAsJsonObject().get("userid").getAsString();