diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java index 237e594..aa19580 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java @@ -162,6 +162,9 @@ public class MenuController extends BladeController { @ApiOperationSupport(order = 10) @ApiOperation(value = "菜单的角色权限") public R> authRoutes(BladeUser user) { + if (Func.isEmpty(user) || user.getUserId() == 0L) { + return null; + } return R.data(menuService.authRoutes(user)); }