From e6a1a8d8ca6edc266e08653a867687d0b6bf7c0a Mon Sep 17 00:00:00 2001 From: huangdeliang <huangdeliang@skieer.com> Date: Thu, 13 May 2021 20:25:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=8E=A5=E5=8F=A3=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WeChartAppletServiceImp.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/WeChartAppletServiceImp.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/WeChartAppletServiceImp.java index 4d0a04e99..8e425e5c8 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/WeChartAppletServiceImp.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/WeChartAppletServiceImp.java @@ -38,13 +38,15 @@ public class WeChartAppletServiceImp implements IWechatAppletService { ResponseEntity<String> entity = restTemplate.getForEntity(url, String.class, param); - JSONObject resultObj = JSONObject.parseObject(entity.getBody()); + return entity.getBody(); - if (resultObj.getInteger("errcode") == 0) { - accessToken = resultObj.getString("access_token"); - Integer expiresIn = resultObj.getInteger("expires_in"); - redisCache.setCacheObject(appId, accessToken, expiresIn, TimeUnit.SECONDS); - } +// JSONObject resultObj = JSONObject.parseObject(entity.getBody()); +// +// if (resultObj.getInteger("errcode") == 0) { +// accessToken = resultObj.getString("access_token"); +// Integer expiresIn = resultObj.getInteger("expires_in"); +// redisCache.setCacheObject(appId, accessToken, expiresIn, TimeUnit.SECONDS); +// } } return accessToken; }