改进更新后的模型update_time数据更新

This commit is contained in:
thinkphp
2017-06-22 18:13:05 +08:00
parent d30316efda
commit e9db7847d3

View File

@@ -997,7 +997,8 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
return 0;
} elseif ($this->autoWriteTimestamp && $this->updateTime && !isset($data[$this->updateTime])) {
// 自动写入更新时间
$data[$this->updateTime] = $this->autoWriteTimestamp($this->updateTime);
$data[$this->updateTime] = $this->autoWriteTimestamp($this->updateTime);
$this->data[$this->updateTime] = $data[$this->updateTime];
}
if (empty($where) && !empty($this->updateWhere)) {