update ZR.Service/System/SysMenuService.cs.
菜单管理查询为空时报错,增加了查询为空时返回一个默认值; Signed-off-by: xbzhu <5430389+xbzhu@user.noreply.gitee.com>
This commit is contained in:
parent
0bf43fe33a
commit
65da38a91d
@ -1,4 +1,4 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
@ -41,7 +41,7 @@ namespace ZR.Service
|
||||
var userRoles = SysRoleService.SelectUserRoles(userId);
|
||||
menuList = SelectTreeMenuListByRoles(menu, userRoles);
|
||||
}
|
||||
return menuList;
|
||||
return menuList ?? new List<SysMenu>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user