* adjust code.

This commit is contained in:
wangyidong
2021-07-01 16:56:59 +08:00
parent c74a1f483d
commit c287a0cb49
7 changed files with 22 additions and 13 deletions
+3
View File
@@ -279,7 +279,10 @@ class deptModel extends model
public function getAllChildId($deptID)
{
if($deptID == 0) return array();
$dept = $this->getById($deptID);
if(empty($dept)) return array();
$childs = $this->dao->select('id')->from(TABLE_DEPT)->where('path')->like($dept->path . '%')->fetchPairs();
return array_keys($childs);
}