修改service方法

This commit is contained in:
不做码农
2021-10-17 17:36:25 +08:00
parent 9980386e9c
commit 86ee45f4e3
4 changed files with 4 additions and 5 deletions

View File

@@ -68,7 +68,7 @@ namespace ZR.Service.System
/// <returns></returns>
public int InsertDept(SysDept dept)
{
SysDept info = DeptRepository.GetSingle(it => it.DeptId == dept.ParentId);
SysDept info = DeptRepository.GetFirst(it => it.DeptId == dept.ParentId);
//如果父节点不为正常状态,则不允许新增子节点
if (!UserConstants.DEPT_NORMAL.Equals(info.Status))
{