mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-09 16:12:49 +08:00
模型saveall方法支持配合isUpdate方法
This commit is contained in:
@@ -1297,7 +1297,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
|||||||
$auto = true;
|
$auto = true;
|
||||||
}
|
}
|
||||||
foreach ($dataSet as $key => $data) {
|
foreach ($dataSet as $key => $data) {
|
||||||
if (!empty($auto) && isset($data[$pk])) {
|
if ($this->isUpdate || (!empty($auto) && isset($data[$pk]))) {
|
||||||
$result[$key] = self::update($data, [], $this->field);
|
$result[$key] = self::update($data, [], $this->field);
|
||||||
} else {
|
} else {
|
||||||
$result[$key] = self::create($data, $this->field);
|
$result[$key] = self::create($data, $this->field);
|
||||||
|
|||||||
Reference in New Issue
Block a user