Unverified Commit 55252345 authored by aiwenmo's avatar aiwenmo Committed by GitHub

[Fix-1662] [admin] OpenApi notLoginException (#2470)

parent cbd98dd7
......@@ -355,7 +355,10 @@ public class UserServiceImpl extends SuperServiceImpl<UserMapper, User> implemen
@Override
public List<Role> getCurrentRole() {
return roleService.getRoleByUserId(StpUtil.getLoginIdAsInt());
if (StpUtil.isLogin()) {
return roleService.getRoleByUserId(StpUtil.getLoginIdAsInt());
}
return new ArrayList<>();
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment