This commit is contained in:
luke 2026-03-24 11:53:49 +08:00
parent 958f5253df
commit 925f222b87

View File

@ -69,7 +69,7 @@ public class UserQueryController {
} catch (Exception e) {
LOGGER.error("userAppService.findToken(token) error", e);
}
if (userTokenOpt.isEmpty()) {
if (Objects.isNull(userTokenOpt) || userTokenOpt.isEmpty()) {
LOGGER.warn("[权限校验] token无效: {}", maskToken(token));
return ResponseEntity.status(401).body(Map.of("code", 401, "msg", "无效token"));
}