1.修复自动创建下一期bug
This commit is contained in:
@@ -616,6 +616,9 @@ final class GameLiveService
|
||||
if ($existingResult !== false && $existingResult >= 1 && $existingResult <= self::DRAW_NUMBER_MAX && $st >= 2) {
|
||||
Db::commit();
|
||||
$periodNo = is_string($record['period_no'] ?? null) ? (string) $record['period_no'] : '';
|
||||
GameHotDataCoordinator::afterGameRecordCommitted($rid);
|
||||
self::publishSnapshot($rid);
|
||||
|
||||
return [
|
||||
'ok' => true,
|
||||
'msg' => __('Draw completed; paying out'),
|
||||
@@ -755,15 +758,7 @@ final class GameLiveService
|
||||
|
||||
public static function tickAutoDraw(): void
|
||||
{
|
||||
if (!GameRecordService::isAutoCreateEnabled()) {
|
||||
$record = Db::name('game_record')
|
||||
->whereIn('status', [0, 1])
|
||||
->order('id', 'asc')
|
||||
->find();
|
||||
$record = is_array($record) ? $record : null;
|
||||
} else {
|
||||
$record = self::resolveRecordForAutoDraw();
|
||||
}
|
||||
$record = self::resolveRecordForAutoDraw();
|
||||
if (!$record || !in_array((int) $record['status'], [0, 1], true)) {
|
||||
return;
|
||||
}
|
||||
@@ -772,7 +767,15 @@ final class GameLiveService
|
||||
if ($elapsed < $periodSeconds) {
|
||||
return;
|
||||
}
|
||||
self::drawResult((int) $record['id'], null);
|
||||
$rid = (int) $record['id'];
|
||||
$out = self::drawResult($rid, null);
|
||||
if (!($out['ok'] ?? false)) {
|
||||
Log::warning('tickAutoDraw: drawResult failed', [
|
||||
'record_id' => $rid,
|
||||
'period_no' => $record['period_no'] ?? '',
|
||||
'msg' => $out['msg'] ?? '',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user