李昊 4 年之前
父节点
当前提交
fc2f07f89b
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      GxPress/Repository/GxPress.Repository.Implement/DepartmentRepository.cs

+ 1 - 2
GxPress/Repository/GxPress.Repository.Implement/DepartmentRepository.cs

@@ -241,10 +241,9 @@ namespace GxPress.Repository.Implement
                     item.ChildrenItems = _mapper.Map<List<DepartmentTreeResult>>(departmentParent);
                     foreach (var childrenItem in item.ChildrenItems)
                     {
-                        GetTreeAsync(departments, childrenItem.Id, item.ChildrenItems);
+                      return  GetTreeAsync(departments, childrenItem.Id, item.ChildrenItems);
                     }
                 }
-                return items;
             }
             return items;
         }