用户列表部门岗位角色信息

This commit is contained in:
陈淳
2022-09-13 19:04:41 +08:00
parent 89762cad78
commit e78e9d8e55
5 changed files with 28 additions and 10 deletions

View File

@@ -131,7 +131,7 @@ namespace Yi.Framework.Service
public async Task<UserEntity> GetInfoById(long userId)
{
return await _repository._DbQueryable.Includes(u => u.Roles).InSingleAsync(userId);
return await _repository._DbQueryable.Includes(u => u.Roles).Includes(u=>u.Posts).Includes(u=>u.Dept).InSingleAsync(userId);
}
public async Task<UserRoleMenuDto> GetUserAllInfo(long userId)
@@ -194,6 +194,8 @@ namespace Yi.Framework.Service
.WhereIF(page.StartTime.IsNotNull() && page.EndTime.IsNotNull(), u => u.CreateTime >= page.StartTime && u.CreateTime <= page.EndTime)
.WhereIF(user.IsDeleted.IsNotNull(),u => u.IsDeleted == user.IsDeleted)
.Includes(u => u.Roles)
.Includes(u=>u.Posts)
.Includes(u=>u.Dept)
.OrderBy(u => u.OrderNum, OrderByType.Desc)
.ToPageListAsync(page.PageNum, page.PageSize, total);