修复baseModel更新数据问题
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -17,3 +17,4 @@ yarn-error.log
|
|||||||
/.fleet
|
/.fleet
|
||||||
/.idea
|
/.idea
|
||||||
/.vscode
|
/.vscode
|
||||||
|
test.php
|
||||||
|
|||||||
@ -43,7 +43,8 @@ class BaseModel extends Model
|
|||||||
if(!$col) $col = $this->primaryKey;
|
if(!$col) $col = $this->primaryKey;
|
||||||
$aItem = $this->checkColInFill($aItem);
|
$aItem = $this->checkColInFill($aItem);
|
||||||
if (empty($aItem)) return false;
|
if (empty($aItem)) return false;
|
||||||
if (isset($aItem[$col])) return false;
|
if (!isset($aItem[$col])) return false;
|
||||||
|
if (empty($aItem[$col])) return false;
|
||||||
return $this->newQuery()->where($col,$aItem[$col])->update($aItem);
|
return $this->newQuery()->where($col,$aItem[$col])->update($aItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user