feat: 菜单种子数据

This commit is contained in:
橙子
2024-09-07 13:43:28 +08:00
parent 40b5f33c4e
commit 579f60e789
4 changed files with 14 additions and 12 deletions

View File

@@ -231,10 +231,11 @@ namespace Yi.Framework.Rbac.Domain.Managers
var userRoleMenu = new UserRoleMenuDto();
//首先获取到该用户全部信息,导航到角色、菜单,(菜单需要去重,完全交给Set来处理即可)
//if (user is null)
//{
// throw new UserFriendlyException($"数据错误用户id{nameof(userId)} 不存在,请重新登录");
//}
if (user is null)
{
//为了解决token前端缓存后端数据库重新dbseed
throw new UserFriendlyException($"数据错误,查询用户不存在,请重新登录");
}
user.EncryPassword.Password = string.Empty;
user.EncryPassword.Salt = string.Empty;