* code for task#1043.

This commit is contained in:
zhujinyong
2013-01-06 05:24:44 +00:00
parent 3f8c141dd4
commit 36318acbfa
+3 -2
View File
@@ -119,7 +119,7 @@ class testtaskModel extends model
* @access public
* @return array
*/
public function getByUser($account)
public function getByUser($account, $pager = null, $orderBy = 'id_desc')
{
return $this->dao->select('t1.*, t2.name AS projectName, t3.name AS buildName')
->from(TABLE_TESTTASK)->alias('t1')
@@ -127,7 +127,8 @@ class testtaskModel extends model
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = t3.id')
->where('t1.deleted')->eq(0)
->andWhere('t1.owner')->eq($account)
->orderBy('id desc')
->orderBy($orderBy)
->page($pager)
->fetchAll();
}