* Finish task#8455.

This commit is contained in:
hufangzhou
2020-11-25 09:15:28 +08:00
parent 9a20bab153
commit 37f8d75f1e
15 changed files with 103 additions and 12 deletions
+17
View File
@@ -1077,6 +1077,23 @@ class programModel extends model
->fetchPairs();
}
/**
* Get project by id list.
*
* @param array $projectIdList
* @access public
* @return object
*/
public function getPRJByIdList($projectIdList = array())
{
return $this->dao->select('*')->from(TABLE_PROJECT)
->where('type')->eq('project')
->andWhere('deleted')->eq(0)
->andWhere('id')->in($projectIdList)
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->fetchAll('id');
}
/**
* Build the query.
*