* code for task #44323.

This commit is contained in:
王怡栋
2021-11-19 10:34:50 +08:00
parent 4f5308aefa
commit e0f2e88048
3 changed files with 27 additions and 6 deletions
+3 -2
View File
@@ -45,10 +45,11 @@ class projectreleaseModel extends model
*
* @param int $projectID
* @param string $type
* @param string $orderBy
* @access public
* @return array
*/
public function getList($projectID, $type = 'all')
public function getList($projectID, $type = 'all', $orderBy = 't1.date_desc')
{
return $this->dao->select('t1.*, t2.name as productName, t3.id as buildID, t3.name as buildName, t3.execution, t4.name as executionName')
->from(TABLE_RELEASE)->alias('t1')
@@ -58,7 +59,7 @@ class projectreleaseModel extends model
->where('t1.project')->eq((int)$projectID)
->beginIF($type != 'all')->andWhere('t1.status')->eq($type)->fi()
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date DESC')
->orderBy($orderBy)
->fetchAll();
}