mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进Query类的select方法
This commit is contained in:
@@ -1855,7 +1855,8 @@ class Query
|
|||||||
$resultSet = false;
|
$resultSet = false;
|
||||||
if (empty($options['fetch_sql']) && !empty($options['cache'])) {
|
if (empty($options['fetch_sql']) && !empty($options['cache'])) {
|
||||||
// 判断查询缓存
|
// 判断查询缓存
|
||||||
$cache = $options['cache'];
|
$cache = $options['cache'];
|
||||||
|
unset($options['cache']);
|
||||||
$key = is_string($cache['key']) ? $cache['key'] : md5(serialize($options));
|
$key = is_string($cache['key']) ? $cache['key'] : md5(serialize($options));
|
||||||
$resultSet = Cache::get($key);
|
$resultSet = Cache::get($key);
|
||||||
}
|
}
|
||||||
@@ -1883,7 +1884,7 @@ class Query
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 返回结果处理
|
// 返回结果处理
|
||||||
if ($this->connection->getNumRows()) {
|
if (count($resultSet) > 0) {
|
||||||
// 数据列表读取后的处理
|
// 数据列表读取后的处理
|
||||||
if (!empty($this->model)) {
|
if (!empty($this->model)) {
|
||||||
// 生成模型对象
|
// 生成模型对象
|
||||||
|
|||||||
Reference in New Issue
Block a user