更新用户信息 头像/昵称
视频号/小程序/公众号mapper 暂未投入使用
This commit is contained in:
@@ -67,6 +67,7 @@ public class LoginFilter implements Filter {
|
||||
chain.doFilter(req, resp);
|
||||
return;
|
||||
}
|
||||
|
||||
//environment 环境标识 wx app 后续environment不可为空
|
||||
String environment = request.getHeader("environment");
|
||||
//token校验目前只对app生效
|
||||
@@ -85,10 +86,17 @@ public class LoginFilter implements Filter {
|
||||
response.getWriter().flush();//流里边的缓存刷出
|
||||
return;
|
||||
}
|
||||
//获取当前登录人的用户id
|
||||
String loginName = TokenUtil.parseParamFromToken(token).getString("userId");
|
||||
//获取redis中的token
|
||||
String message = redisUtil.getMessage(RedisCst.ONLINE_APP_USER.concat(loginName));
|
||||
String message = "";
|
||||
if(environment.equals("app")){
|
||||
//获取当前登录人的用户id
|
||||
String loginName = TokenUtil.parseParamFromToken(token).getString("userId");
|
||||
//获取redis中的token
|
||||
message = redisUtil.getMessage(RedisCst.ONLINE_APP_USER.concat(loginName));
|
||||
}else if(environment.equals("wx")){
|
||||
//获取当前登录人的用户id
|
||||
String openId = TokenUtil.parseParamFromToken(token).getString("openId");
|
||||
message = redisUtil.getMessage(RedisCst.ONLINE_USER.concat(openId));
|
||||
}
|
||||
if (StringUtils.isBlank(message)) {
|
||||
Result result = new Result(CodeEnum.TOKEN_EXPIRED);
|
||||
String jsonString = JSONObject.toJSONString(result);
|
||||
|
||||
Reference in New Issue
Block a user