|
@@ -666,7 +666,8 @@ namespace GxPress.Repository.Implement
|
|
|
/// <returns></returns>
|
|
|
public async Task<IEnumerable<User>> GetUserByDepartmentIdAsync(int departmentId)
|
|
|
{
|
|
|
- return await _repository.GetAllAsync(Q.Where(nameof(User.DepartmentId), departmentId));
|
|
|
+ var userIds = await departmentUserRepository.GetUserIdsByDepartmentIdsAsync(new List<int>() { departmentId });
|
|
|
+ return await _repository.GetAllAsync(Q.WhereIn(nameof(User.Id), userIds));
|
|
|
}
|
|
|
|
|
|
public async Task<IEnumerable<int>> GetUserIdListByDepartmentIdAsync(int departmentId)
|