* adjust code.

This commit is contained in:
wangyidong
2020-04-08 09:18:45 +08:00
parent ba8638758e
commit 40fc4ad25b
30 changed files with 563 additions and 274 deletions
+12 -12
View File
@@ -350,8 +350,8 @@ class testcaseModel extends model
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
->beginIF($browseType == 'wait')->andWhere('t1.status')->eq($browseType)->fi()
->beginIF($auto == 'no')->andWhere('t1.auto')->eq('no')->fi()
->beginIF($auto != 'no')->andWhere('t1.auto')->ne('no')->fi()
->beginIF($auto == 'unit')->andWhere('t1.auto')->eq('unit')->fi()
->beginIF($auto != 'unit')->andWhere('t1.auto')->ne('unit')->fi()
->andWhere('t1.deleted')->eq('0')
->orderBy($orderBy)->page($pager)->fetchAll('id');
}
@@ -378,8 +378,8 @@ class testcaseModel extends model
->andWhere('t3.suite')->eq((int)$suiteID)
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF($moduleIdList)->andWhere('t1.module')->in($moduleIdList)->fi()
->beginIF($auto == 'no')->andWhere('t1.auto')->eq('no')->fi()
->beginIF($auto != 'no')->andWhere('t1.auto')->ne('no')->fi()
->beginIF($auto == 'unit')->andWhere('t1.auto')->eq('unit')->fi()
->beginIF($auto != 'unit')->andWhere('t1.auto')->ne('unit')->fi()
->andWhere('t1.deleted')->eq('0')
->orderBy($orderBy)->page($pager)->fetchAll('id');
}
@@ -469,8 +469,8 @@ class testcaseModel extends model
->andWhere('t1.product')->eq($productID)
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
->beginIF($auto == 'no')->andWhere('t1.auto')->eq('no')->fi()
->beginIF($auto != 'no')->andWhere('t1.auto')->ne('no')->fi()
->beginIF($auto != 'unit')->andWhere('t1.auto')->ne('unit')->fi()
->beginIF($auto == 'unit')->andWhere('t1.auto')->eq('unit')->fi()
->orderBy($sort)
->page($pager)
->fetchAll();
@@ -537,8 +537,8 @@ class testcaseModel extends model
$cases = $this->dao->select('*')->from(TABLE_CASE)->where($caseQuery)
->beginIF($queryProductID != 'all')->andWhere('product')->eq($productID)->fi()
->beginIF($auto == 'no')->andWhere('t1.auto')->eq('no')->fi()
->beginIF($auto != 'no')->andWhere('t1.auto')->ne('no')->fi()
->beginIF($auto != 'unit')->andWhere('t1.auto')->ne('unit')->fi()
->beginIF($auto == 'unit')->andWhere('t1.auto')->eq('unit')->fi()
->andWhere('deleted')->eq(0)
->orderBy($orderBy)->page($pager)->fetchAll('id');
@@ -565,8 +565,8 @@ class testcaseModel extends model
->andWhere('t3.status')->ne('done')
->andWhere('t3.deleted')->eq(0)
->andWhere('t2.deleted')->eq(0)
->beginIF($auto == 'no')->andWhere('t1.auto')->eq('no')->fi()
->beginIF($auto != 'no')->andWhere('t1.auto')->ne('no')->fi()
->beginIF($auto != 'unit')->andWhere('t1.auto')->ne('unit')->fi()
->beginIF($auto == 'unit')->andWhere('t1.auto')->eq('unit')->fi()
->orderBy($orderBy)->page($pager)->fetchAll();
}
@@ -585,8 +585,8 @@ class testcaseModel extends model
return $this->dao->findByOpenedBy($account)->from(TABLE_CASE)
->andWhere('product')->ne(0)
->andWhere('deleted')->eq(0)
->beginIF($auto == 'no')->andWhere('auto')->eq('no')->fi()
->beginIF($auto != 'no')->andWhere('auto')->ne('no')->fi()
->beginIF($auto != 'unit')->andWhere('auto')->ne('unit')->fi()
->beginIF($auto == 'unit')->andWhere('auto')->eq('unit')->fi()
->orderBy($orderBy)->page($pager)->fetchAll();
}