1.优化玩家抽奖时没有记录dept_id的问题
This commit is contained in:
@@ -244,14 +244,19 @@ class GameController extends BaseController
|
||||
$timeoutRecord = null;
|
||||
$timeout_message = '';
|
||||
$adminId = null;
|
||||
$timeoutDeptId = null;
|
||||
try {
|
||||
$timeoutPlayer = DicePlayer::find($userId);
|
||||
$adminId = ($timeoutPlayer && ($timeoutPlayer->admin_id ?? null)) ? (int) $timeoutPlayer->admin_id : null;
|
||||
if ($timeoutPlayer && isset($timeoutPlayer->dept_id) && $timeoutPlayer->dept_id !== null && $timeoutPlayer->dept_id !== '') {
|
||||
$timeoutDeptId = (int) $timeoutPlayer->dept_id;
|
||||
}
|
||||
} catch (\Throwable $_) {
|
||||
}
|
||||
try {
|
||||
$timeoutRecord = DicePlayRecord::create([
|
||||
'player_id' => $userId,
|
||||
'dept_id' => $timeoutDeptId,
|
||||
'admin_id' => $adminId,
|
||||
'lottery_config_id' => 0,
|
||||
'lottery_type' => 0,
|
||||
|
||||
Reference in New Issue
Block a user