* Rename jenkins table.

This commit is contained in:
Guanxiying
2021-06-08 13:04:03 +08:00
parent e2157697e8
commit 4492f5f23c
8 changed files with 20 additions and 58 deletions

View File

@@ -37,7 +37,7 @@ class compileModel extends model
return $this->dao->select('t1.id, t1.name, t1.job, t1.status, t1.createdDate,t1.testtask, t2.jkJob,t2.triggerType,t2.comment,t2.atDay,t2.atTime, t3.name as repoName, t4.name as jenkinsName')->from(TABLE_COMPILE)->alias('t1')
->leftJoin(TABLE_JOB)->alias('t2')->on('t1.job=t2.id')
->leftJoin(TABLE_REPO)->alias('t3')->on('t2.repo=t3.id')
->leftJoin(TABLE_JENKINS)->alias('t4')->on('t2.jkHost=t4.id')
->leftJoin(TABLE_PIPELINE)->alias('t4')->on('t2.jkHost=t4.id')
->where('t1.deleted')->eq('0')
->andWhere('t1.job')->ne('0')
->beginIF(!empty($jobID))->andWhere('t1.job')->eq($jobID)->fi()
@@ -123,7 +123,7 @@ class compileModel extends model
{
$job = $this->dao->select('t1.id,t1.name,t1.repo,t1.jkJob,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password')
->from(TABLE_JOB)->alias('t1')
->leftJoin(TABLE_JENKINS)->alias('t2')->on('t1.jkHost=t2.id')
->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.jkHost=t2.id')
->where('t1.id')->eq($compile->job)
->fetch();