* code for task #1939.

This commit is contained in:
wangyidong
2014-07-21 03:21:09 +00:00
parent 60925388fd
commit 2bd50ee02f
10 changed files with 179 additions and 46 deletions
+6 -5
View File
@@ -144,11 +144,12 @@ class testcaseModel extends model
*/
public function getModuleCases($productID, $moduleIds = 0, $orderBy = 'id_desc', $pager = null)
{
return $this->dao->select('*')->from(TABLE_CASE)
->where('product')->eq((int)$productID)
->beginIF($moduleIds)->andWhere('module')->in($moduleIds)->fi()
->andWhere('deleted')->eq('0')
->orderBy($orderBy)->page($pager)->fetchAll();
return $this->dao->select('t1.*, t2.title as storyTitle')->from(TABLE_CASE)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
->where('t1.product')->eq((int)$productID)
->beginIF($moduleIds)->andWhere('t1.module')->in($moduleIds)->fi()
->andWhere('t1.deleted')->eq('0')
->orderBy($orderBy)->page($pager)->fetchAll('id');
}
/**