改进Model类和Query类 Model类的name属性改为static定义

This commit is contained in:
thinkphp
2016-05-04 16:24:51 +08:00
parent df39f1706f
commit 6b26b1ee25
3 changed files with 18 additions and 16 deletions

View File

@@ -258,7 +258,7 @@ class Query
}
if ($lazyTime > 0) {
// 延迟写入
$guid = md5($this->name . '_' . $field . '_' . serialize($condition));
$guid = md5($this->getTable() . '_' . $field . '_' . serialize($condition));
$step = $this->lazyWrite($guid, $step, $lazyTime);
if (empty($step)) {
return true; // 等待下次写入
@@ -285,7 +285,7 @@ class Query
}
if ($lazyTime > 0) {
// 延迟写入
$guid = md5($this->name . '_' . $field . '_' . serialize($condition));
$guid = md5($this->getTable() . '_' . $field . '_' . serialize($condition));
$step = $this->lazyWrite($guid, -$step, $lazyTime);
if (empty($step)) {
return true; // 等待下次写入