* Optimize codes.

This commit is contained in:
daitingting
2022-11-01 06:19:45 +00:00
parent 4a9e97b29c
commit 219f7d6a24
3 changed files with 71 additions and 69 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ class programModel extends model
if(!empty($append) and is_array($append)) $append = implode(',', $append);
$views = empty($append) ? $this->app->user->view->products : $this->app->user->view->products . ",$append";
$products = $this->dao->select("t1.id, t1.program, CONCAT(IF(t2.name is not null, t2.name, ''), '/', t1.name) AS name")->from(TABLE_PRODUCT)->alias('t1')
$products = $this->dao->select("t1.id, t1.program, CONCAT(IF(t2.name IS NOT NULL, t2.name, ''), '/', t1.name) AS name")->from(TABLE_PRODUCT)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.program = t2.id')
->where('t1.deleted')->eq('0')
->andWhere('t1.vision')->eq($this->config->vision)