update:更新快捷搜索

This commit is contained in:
JaguarJack
2021-03-06 20:05:20 +08:00
parent f45b9315a9
commit 766a01e766
4 changed files with 181 additions and 1 deletions

View File

@@ -181,8 +181,11 @@ class CatchQuery extends Query
$this->whereRightLike($field, $value);
}
}
// = 值搜索
$this->where($field, $value);
if ($value || is_numeric($value)) {
$this->where($field, $value);
}
}
}
@@ -296,6 +299,10 @@ class CatchQuery extends Query
$this->order($this->getTable() . '.sort', $order);
}
if (in_array('weight', array_keys($this->getFields()))) {
$this->order($this->getTable() . '.weight', $order);
}
$this->order($this->getTable() . '.' . $this->getPk(), $order);
return $this;