* [misc] fix sql.

This commit is contained in:
liyang
2025-12-02 16:31:29 +08:00
committed by sunhao
parent 4a8da0a8d0
commit d14f50e8e5
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -621,7 +621,7 @@ class blockZen extends block
$this->view->projects = $this->loadModel('project')->getPairsByProgram();
$this->view->testtasks = $this->dao->select("DISTINCT t1.*,t2.name as productName,t2.shadow,t3.name as buildName,t4.name as projectName, CONCAT(t4.name, '/', t3.name) as executionBuild")->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=CAST(t3.id AS VARCHAR(20))')
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=CAST(t3.id AS CHAR)')
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.execution=t4.id')
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.execution=t5.project')
->where('t1.deleted')->eq('0')
@@ -1572,7 +1572,7 @@ class blockZen extends block
$this->view->project = $this->loadModel('project')->getByID($this->session->project);
$this->view->testtasks = $this->dao->select("DISTINCT t1.*,t2.name as productName,t2.shadow,t3.name as buildName,t4.name as executionName, CONCAT(t4.name, '/', t3.name) as executionBuild")->from(TABLE_TESTTASK)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=CAST(t3.id AS VARCHAR(20))')
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=CAST(t3.id AS CHAR)')
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.execution=t4.id')
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.project=t5.project')
->where('t1.deleted')->eq('0')