从新设计抽奖逻辑
This commit is contained in:
@@ -97,6 +97,7 @@ class GameController extends OpenController
|
||||
return $this->fail($e->getMessage(), ReturnCode::BUSINESS_ERROR);
|
||||
} catch (\Throwable $e) {
|
||||
$timeoutRecord = null;
|
||||
$timeout_message = '';
|
||||
try {
|
||||
$timeoutRecord = DicePlayRecord::create([
|
||||
'player_id' => $userId,
|
||||
@@ -116,7 +117,8 @@ class GameController extends OpenController
|
||||
}
|
||||
|
||||
$payload = $timeoutRecord ? ['record' => $timeoutRecord->toArray()] : [];
|
||||
return $this->success($payload, '服务超时,'.$timeout_message ?? '没有原因');
|
||||
$msg = $timeout_message !== '' ? $timeout_message : '没有原因';
|
||||
return $this->fail('服务超时,' . $msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user