| | |
| | | if (loginUserInfoVO.getIsRealNamed() != null && loginUserInfoVO.getIsRealNamed()) { |
| | | authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS_REAL_NAMED)); |
| | | } |
| | | }else{ |
| | | //查询登陆用户信息 |
| | | R<LoginUserInfoVO> r = userService.getUserInfoByUserId(username); |
| | | if (!R.isOk(r)) { |
| | | ResultUtil.responseJson(response, R.fail(HttpStatus.ERROR, "登录用户信息查询失败")); |
| | | return; |
| | | } |
| | | LoginUserInfoVO data = r.getData(); |
| | | String userInfo = JSONObject.toJSONString(data); |
| | | valueOperations.set(userKey,userInfo,24,TimeUnit.HOURS); |
| | | } |
| | | valueOperations.set(roleAppletKey, JSONArray.toJSONString(authorities), 24, TimeUnit.HOURS); |
| | | } |