mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
改进
This commit is contained in:
@@ -870,13 +870,12 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($data)) {
|
if (empty($data) || (count($data) == 1 && is_string($pk) && isset($data[$pk]))) {
|
||||||
if ($this->autoWriteTimestamp && $this->updateTime && !isset($data[$this->updateTime])) {
|
// 没有更新
|
||||||
// 自动写入更新时间
|
|
||||||
$data[$this->updateTime] = $this->autoWriteTimestamp($this->updateTime);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return 0;
|
return 0;
|
||||||
|
} elseif ($this->autoWriteTimestamp && $this->updateTime && !isset($data[$this->updateTime])) {
|
||||||
|
// 自动写入更新时间
|
||||||
|
$data[$this->updateTime] = $this->autoWriteTimestamp($this->updateTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($where) && !empty($this->updateWhere)) {
|
if (empty($where) && !empty($this->updateWhere)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user