/// <summary> /// 根据parentId获取全部机构 /// </summary> /// <param name="parentId"></param> /// <returns></returns> public async Task <IList <DepartmentListDto> > GetAllAsync(int?parentId) { var departments = await _departmentManager.GetAllAsync(parentId); return(Mapper.Map <IList <DepartmentListDto> >(departments)); }