* adjust code for task #2543.

This commit is contained in:
chenfeiCF
2016-05-02 21:04:51 +08:00
parent 17de99d55e
commit 2ea55f54f5
6 changed files with 43 additions and 19 deletions
+2 -1
View File
@@ -343,9 +343,10 @@ class deptModel extends model
*/
public function getDeptUserPairs($deptID = 0)
{
$childDepts = $this->getAllChildID($deptID);
return $this->dao->select('account, realname')->from(TABLE_USER)
->where('deleted')->eq(0)
->beginIF($deptID)->andWhere('dept')->in($this->getAllChildID($deptID))->fi()
->beginIF($deptID)->andWhere('dept')->in($childDepts)->fi()
->orderBy('account')
->fetchPairs();
}