微信接口开发
This commit is contained in:
		| @@ -38,15 +38,12 @@ public class WeChartAppletServiceImp implements IWechatAppletService { | ||||
|  | ||||
|             ResponseEntity<String> entity = restTemplate.getForEntity(url, String.class, param); | ||||
|  | ||||
|             return entity.getBody(); | ||||
|  | ||||
| //            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); | ||||
| //            } | ||||
|             JSONObject resultObj = JSONObject.parseObject(entity.getBody()); | ||||
|  | ||||
|             accessToken = resultObj.getString("access_token"); | ||||
|             Integer expiresIn = resultObj.getInteger("expires_in"); | ||||
|             redisCache.setCacheObject(appId, accessToken, expiresIn, TimeUnit.SECONDS); | ||||
|         } | ||||
|         return accessToken; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user