This commit is contained in:
2021-02-24 18:34:57 +08:00
parent 22148402b6
commit 9024c7c3ab
21 changed files with 245 additions and 349 deletions
+6 -3
View File
@@ -152,9 +152,12 @@ class ActiveRecord extends BaseActiveRecord
if (empty($condition)) {
$condition = [$this->getPrimary() => $this->getPrimaryValue()];
}
return static::getDb()->createCommand()
->mathematics(self::getTable(), [$action => $columns], $condition)
->exec($this);
$execute = static::getDb()->createCommand()
->mathematics(self::getTable(), [$action => $columns], $condition);
if ($execute instanceof Command) {
return $execute->exec($this);
}
return false;
}