diff --git a/src/Listeners/HistoryListeners.php b/src/Listeners/HistoryListeners.php index 3285d81..46feb36 100644 --- a/src/Listeners/HistoryListeners.php +++ b/src/Listeners/HistoryListeners.php @@ -22,7 +22,7 @@ public function exec(?User $user, $money) { $userMoneyHistory->source_desc = $this->sourceDesc; $userMoneyHistory->balance_money = 0; $userMoneyHistory->last_money = $user->money; - $userMoneyHistory->create_user_id = $user->id; + $userMoneyHistory->create_user_id = $user->create_user_id ? $user->create_user_id : $user->id; $userMoneyHistory->change_time = Date("Y-m-d H:i:s"); $userMoneyHistory->save(); }