mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-09 16:12:49 +08:00
改进Query类delete方法的缓存标识读取
This commit is contained in:
@@ -2565,6 +2565,7 @@ class Query
|
|||||||
{
|
{
|
||||||
// 分析查询表达式
|
// 分析查询表达式
|
||||||
$options = $this->parseExpress();
|
$options = $this->parseExpress();
|
||||||
|
$pk = $this->getPk($options);
|
||||||
if (isset($options['cache']) && is_string($options['cache']['key'])) {
|
if (isset($options['cache']) && is_string($options['cache']['key'])) {
|
||||||
$key = $options['cache']['key'];
|
$key = $options['cache']['key'];
|
||||||
}
|
}
|
||||||
@@ -2576,6 +2577,8 @@ class Query
|
|||||||
}
|
}
|
||||||
// AR模式分析主键条件
|
// AR模式分析主键条件
|
||||||
$this->parsePkWhere($data, $options);
|
$this->parsePkWhere($data, $options);
|
||||||
|
} elseif (is_string($pk) && isset($options['where']['AND'][$pk]) && is_scalar($options['where']['AND'][$pk])) {
|
||||||
|
$key = 'think:' . $options['table'] . '|' . $options['where']['AND'][$pk];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (true !== $data && empty($options['where'])) {
|
if (true !== $data && empty($options['where'])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user