* Finish task #65808.

This commit is contained in:
tianshujie
2022-08-23 13:40:34 +08:00
parent d8a419798d
commit 4e1ca8bd60
5 changed files with 76 additions and 34 deletions
+4 -1
View File
@@ -2111,9 +2111,12 @@ EOD;
$table = $this->config->objectTables[$type];
$orderBy = $type . 'OrderBy';
$orderBy = $this->session->$orderBy;
$select = '';
if($this->session->$typeOnlyCondition)
{
$sql = $this->dao->select('*')->from($table)
if(strpos($orderBy, 'priOrder') !== false) $select .= ', IF(`pri` = 0, 999, `pri`) as priOrder';
if(strpos($orderBy, 'severityOrder') !== false) $select .= ', IF(`severity` = 0, 999, `severity`) as severityOrder';
$sql = $this->dao->select("*$select")->from($table)
->where($queryCondition)
->beginIF($orderBy != false)->orderBy($orderBy)->fi()
->get();