mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-10 00:22:48 +08:00
Query类value和column增加对调用field链式操作方法的处理
This commit is contained in:
@@ -107,6 +107,9 @@ class Query
|
||||
$result = Cache::get($key);
|
||||
}
|
||||
if (!$result) {
|
||||
if (isset($this->options['field'])) {
|
||||
unset($this->options['field']);
|
||||
}
|
||||
$pdo = $this->field($field)->fetchPdo(true)->find();
|
||||
$result = $pdo->fetchColumn();
|
||||
if (isset($cache)) {
|
||||
@@ -137,6 +140,9 @@ class Query
|
||||
$result = Cache::get($guid);
|
||||
}
|
||||
if (!$result) {
|
||||
if (isset($this->options['field'])) {
|
||||
unset($this->options['field']);
|
||||
}
|
||||
if ($key && '*' != $field) {
|
||||
$field = $key . ',' . $field;
|
||||
}
|
||||
@@ -642,14 +648,13 @@ class Query
|
||||
|
||||
$page = isset($config['page']) ? (int) $config['page'] : call_user_func([
|
||||
$class,
|
||||
'getCurrentPage'
|
||||
'getCurrentPage',
|
||||
], $config['var_page']);
|
||||
|
||||
$page = $page < 1 ? 1 : $page;
|
||||
|
||||
$config['path'] = isset($config['path']) ? $config['path'] : call_user_func([$class, 'getCurrentPath']);
|
||||
|
||||
|
||||
/** @var Paginator $paginator */
|
||||
if (!$simple) {
|
||||
$options = $this->getOptions();
|
||||
|
||||
Reference in New Issue
Block a user