相关记录表admin_id关联当前管理员id
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user