修复获得用户数据的方法

pull/93/head
F4NNIU 2018-11-30 23:07:37 +08:00
parent c6ef72f5fa
commit b68f19dc09
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class User extends Model
self::beforeUpdate(function ($row) {
$changedata = $row->getChangedData();
if (isset($changedata['money'])) {
$origin = $row->getOriginData();
$origin = $row->getData();
MoneyLog::create(['user_id' => $row['id'], 'money' => $changedata['money'] - $origin['money'], 'memo' => '管理员变更金额']);
}
});