未登录首页异常

This commit is contained in:
谭凯凯 2025-01-08 19:46:16 +08:00 committed by Tankaikai
parent 4f9eaf9aca
commit df1fba7465
1 changed files with 3 additions and 0 deletions

View File

@ -108,6 +108,9 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
// 设置 userId request 后续根据 userId 获取用户信息
UserEntity user = userService.selectUserById(userId);
if(user == null) {
throw new CzgException("会话失效,请重新登录");
}
if (user != null && user.getStatus().equals(0)) {
throw new CzgException("异常行为用户: {}" + user.getUserId());
}