| | |
| | | |
| | | ResponseEntity<String> paramOut = outRestTemplate.getForEntity(url, String.class); |
| | | |
| | | logger.debug("调用微信换去openId ", paramOut); |
| | | logger.debug("调用微信换去openId {}", paramOut); |
| | | if (paramOut.getStatusCode() != HttpStatus.OK) { |
| | | return ResultVo.redirectPage("/"); |
| | | |
| | |
| | | |
| | | paramOut = outRestTemplate.getForEntity(url, String.class); |
| | | |
| | | logger.debug("调用微信换去openId ", paramOut); |
| | | logger.debug("调用微信换去openId {}", paramOut); |
| | | if (paramOut.getStatusCode() != HttpStatus.OK) { |
| | | return ResultVo.redirectPage("/"); |
| | | } |
| | |
| | | ResponseEntity<String> responseEntity = this.callCenterService(restTemplate, pd, paramAuth.toJSONString(), |
| | | "/staff/updateStaffAppAuth", HttpMethod.POST); |
| | | url = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | if(url.contains("/#/")){ |
| | | if(url.contains("?")){ |
| | | url += ("&wAppId="+smallWeChatDto.getAppId()); |
| | | }else{ |
| | | url += ("?wAppId="+smallWeChatDto.getAppId()); |
| | | } |
| | | }else{ |
| | | url += ("/#/?wAppId="+smallWeChatDto.getAppId()); |
| | | } |
| | | return ResultVo.redirectPage(url); |
| | | |
| | | } |
| | |
| | | |
| | | String openUrl = ""; |
| | | String url = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | url = url |
| | | + "/app/loginStaffWechatAuth?appId=992020061452450002&staffId=" |
| | | + staffId + "&storeId=" + storeId + "&wId=" + WechatFactory.getWId(smallWeChatDto.getAppId()) |
| | | + "&communityId=" + communityId; |
| | | |
| | | if (url.contains("?")) { |
| | | url += ("&wAppId=" + smallWeChatDto.getAppId()); |
| | |
| | | .replace( |
| | | "REDIRECT_URL", |
| | | URLEncoder |
| | | .encode( |
| | | (url |
| | | + "/app/loginStaffWechatAuth?appId=992020061452450002&staffId=" |
| | | + staffId + "&storeId=" + storeId + "&wId=" + WechatFactory.getWId(smallWeChatDto.getAppId())) |
| | | + "&communityId=" + communityId, |
| | | .encode(url, |
| | | "UTF-8")).replace("STATE", "1"); |
| | | response.sendRedirect(openUrl); |
| | | } catch (Exception e) { |