|
|
@ -38,15 +38,16 @@ public class AuthInterceptor implements HandlerInterceptor { |
|
|
|
Object loginStatus = ops.get(token); |
|
|
|
Object loginStatus = ops.get(token); |
|
|
|
//userid
|
|
|
|
//userid
|
|
|
|
String userId = request.getParameter("userId"); |
|
|
|
String userId = request.getParameter("userId"); |
|
|
|
if (!StringUtils.isEmpty(userId)){ |
|
|
|
|
|
|
|
return userId.equals(ops.get(token)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( Objects.isNull(loginStatus)){ |
|
|
|
if( Objects.isNull(loginStatus)){ |
|
|
|
response.getWriter().print("1");//token错误
|
|
|
|
response.getWriter().print("1");//token错误
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
if (!StringUtils.isEmpty(userId)){ |
|
|
|
|
|
|
|
return userId.equals(loginStatus); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|