优化代码

This commit is contained in:
不做码农
2022-01-08 21:48:09 +08:00
parent 3fee68d504
commit 58bbb2b967
5 changed files with 19 additions and 22 deletions

View File

@@ -55,6 +55,7 @@ namespace ZR.Service
if (user != null && user.UserId > 0)
{
user.Roles = RoleService.SelectUserRoleListByUserId(userId);
user.RoleIds = user.Roles.Select(x => x.RoleId).ToArray();
}
return user;
}