相关记录表admin_id关联当前管理员id

This commit is contained in:
2026-03-10 12:30:56 +08:00
parent b1efeb8b31
commit fdd8f6dffa
18 changed files with 290 additions and 26 deletions

View File

@@ -69,10 +69,12 @@ class GameLogic
UserCache::setUser($playerId, $updatedUserArr);
$adminId = ($player->admin_id ?? null) ? (int) $player->admin_id : null;
try {
Db::transaction(function () use (
$player,
$playerId,
$adminId,
$cost,
$coinBefore,
$coinAfter,
@@ -91,6 +93,7 @@ class GameLogic
DicePlayerWalletRecord::create([
'player_id' => $playerId,
'admin_id' => $adminId,
'coin' => -$cost,
'type' => self::WALLET_TYPE_BUY_DRAW,
'wallet_before' => $coinBefore,
@@ -103,6 +106,7 @@ class GameLogic
DicePlayerTicketRecord::create([
'player_id' => $playerId,
'admin_id' => $adminId,
'use_coins' => $cost,
'total_ticket_count' => $addTotal,
'paid_ticket_count' => $addPaid,