完成部门管理没实现功能

This commit is contained in:
不做码农
2021-12-25 12:05:30 +08:00
parent 27cca0e4a4
commit 412dccf416
4 changed files with 57 additions and 21 deletions

View File

@@ -7,7 +7,7 @@ namespace ZR.Repository.System
/// <summary>
/// 部门管理
/// </summary>
[AppService(ServiceLifetime= LifeTime.Transient)]
[AppService(ServiceLifetime = LifeTime.Transient)]
public class SysDeptRepository : BaseRepository<SysDept>
{
/// <summary>
@@ -22,9 +22,10 @@ namespace ZR.Repository.System
return Context.SqlQueryable<SysDept>(sql).AddParameters(new { @deptId = deptId }).ToList();
}
public int UdateDeptChildren(SysDept dept)
public int UdateDeptChildren(List<SysDept> dept)
{
return Context.Updateable(dept).UpdateColumns(it => new { it.Ancestors }).ExecuteCommand();
return Context.Updateable(dept).WhereColumns(f => new { f.DeptId })
.UpdateColumns(it => new { it.Ancestors }).ExecuteCommand();
}
}
}