李昊 4 年之前
父节点
当前提交
ea762f5d75

+ 1 - 1
gx_api/GxPress/Repository/GxPress.Repository.Implement/DepartmentUser/DepartmentUserRepository.cs

@@ -51,7 +51,7 @@ namespace GxPress.Repository.Implement.DepartmentUser
         public async Task<IEnumerable<int>> GetUserIdsByUserIdAsync(int userId)
         {
             var departmentIds = await _repository.GetAllAsync<int>(Q.Where(nameof(Entity.DepartmentUser.UserId), userId).Select(nameof(Entity.DepartmentUser.DepartmentId)));
-            return await _repository.GetAllAsync<int>(Q.Where(nameof(Entity.DepartmentUser.DepartmentId), departmentIds).Select(nameof(Entity.DepartmentUser.UserId)));
+            return await _repository.GetAllAsync<int>(Q.WhereIn(nameof(Entity.DepartmentUser.DepartmentId), departmentIds).Select(nameof(Entity.DepartmentUser.UserId)));
         }
         /// <summary>
         /// 根据部门ID集合获取用户