| | |
| | | String urlString = "?appid={appId}&secret={secret}&js_code={code}&grant_type={grantType}"; |
| | | String response = outRestTemplate.getForObject( |
| | | wechatAuthProperties.getSessionHost() + urlString, String.class, |
| | | wechatAuthProperties.getAppId(), |
| | | wechatAuthProperties.getSecret(), |
| | | smallWeChatDto.getAppId(), |
| | | smallWeChatDto.getAppSecret(), |
| | | code, |
| | | wechatAuthProperties.getGrantType()); |
| | | |
| | |
| | | if (ownerAppUserDtos == null || ownerAppUserDtos.size() < 1) { |
| | | //将openId放到redis 缓存,给前段下发临时票据 |
| | | paramOut.put("openId", openId); |
| | | paramOut.put("sessionKey", sessionKey); |
| | | paramOut.put("msg", "还没有注册请先注册"); |
| | | responseEntity = new ResponseEntity<String>(paramOut.toJSONString(), HttpStatus.UNAUTHORIZED); |
| | | |