Merge branch '15.0' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
public function getFamily($categoryID, $type = '', $root = 0)
|
||||
{
|
||||
if($categoryID == 0 and empty($type)) return array();
|
||||
$category = $this->getById($categoryID);
|
||||
$category = $this->loadModel('dept')->getById($categoryID);
|
||||
|
||||
if($category)
|
||||
{
|
||||
return $this->dao->select('id')->from(TABLE_MODULE)->where('deleted')->eq('0')->andWhere('path')->like($category->path . '%')->fetchPairs();
|
||||
return $this->dao->select('id')->from(TABLE_DEPT)->where('path')->like($category->path . '%')->fetchPairs();
|
||||
}
|
||||
if(!$category)
|
||||
{
|
||||
return $this->dao->select('id')->from(TABLE_MODULE)->where('deleted')->eq('0')->andWhere('type')->eq($type)->beginIF($root)->andWhere('root')->eq((int)$root)->fi()->fetchPairs();
|
||||
return $this->dao->select('id')->from(TABLE_DEPT)->beginIF($root)->where('root')->eq((int)$root)->fi()->fetchPairs();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user