| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.model.vos.sangeshenbian.SystemUserVo; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | |
| | | LoginUserInfoVO loginUserInfoVO = JSONObject.parseObject(userInfo, LoginUserInfoVO.class); |
| | | return loginUserInfoVO; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取三个身边管理后台登录用户信息 |
| | | * @return |
| | | */ |
| | | @SneakyThrows |
| | | public SystemUserVo getLoginUserInfoSanGeShenBian() { |
| | | HttpServletRequest request = this.getRequest(); |
| | | String userInfo = request.getHeader(TokenConstant.TOKEN_USERINFO); |
| | | boolean empty = ObjectUtils.isEmpty(userInfo); |
| | | if (empty) { |
| | | return null; |
| | | } |
| | | byte[] bytes = AES.parseHexStr2Byte(userInfo); |
| | | byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY); |
| | | userInfo = new String(decrypt); |
| | | SystemUserVo loginUserInfoVO = JSONObject.parseObject(userInfo, SystemUserVo.class); |
| | | return loginUserInfoVO; |
| | | } |
| | | } |