Merge branch 'sprint/app10'

This commit is contained in:
王怡栋
2021-11-25 10:25:05 +08:00
25 changed files with 410 additions and 154 deletions
+3 -2
View File
@@ -55,10 +55,11 @@ class buildModel extends model
* @param int $projectID
* @param string $type
* @param int $param
* @param string $orderBy
* @access public
* @return array
*/
public function getProjectBuilds($projectID = 0, $type = 'all', $param = 0)
public function getProjectBuilds($projectID = 0, $type = 'all', $param = 0, $orderBy = 't1.date_desc,t1.id_desc')
{
return $this->dao->select('t1.*, t2.name as executionName, t2.id as executionID, t3.name as productName, t4.name as branchName')
->from(TABLE_BUILD)->alias('t1')
@@ -70,7 +71,7 @@ class buildModel extends model
->andWhere('t1.project')->ne(0)
->beginIF($type == 'product' and $param)->andWhere('t1.product')->eq($param)->fi()
->beginIF($type == 'bysearch')->andWhere($param)->fi()
->orderBy('t1.date DESC, t1.id desc')
->orderBy($orderBy)
->fetchAll('id');
}