feat: 彩票业务迁移并补全后台权限与代理结算体系

This commit is contained in:
2026-06-10 10:29:43 +08:00
parent bbdb69dabb
commit 1948b10fe6
108 changed files with 7083 additions and 5033 deletions

View File

@@ -3,17 +3,27 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
use App\Services\Draw\LotteryHallRealtimeBroadcaster;
final class LotteryHallCountdownCommand extends Command
{
protected $signature = 'lottery:hall-countdown';
protected $description = '大厅 countdown WebSocket`draw.countdown`每秒;见界面文档 §2.1';
protected $description = '大厅 countdown WebSocket`draw.countdown`按配置频率;见界面文档 §2.1';
public function handle(LotteryHallRealtimeBroadcaster $broadcaster): int
{
$startedAt = hrtime(true);
$broadcaster->countdownPulse();
$elapsedMs = (int) round((hrtime(true) - $startedAt) / 1_000_000);
if ($elapsedMs >= (int) config('lottery.realtime_hall_countdown_warn_threshold_ms', 800)) {
Log::warning('lottery:hall-countdown exceeded warn threshold', [
'elapsed_ms' => $elapsedMs,
'threshold_ms' => (int) config('lottery.realtime_hall_countdown_warn_threshold_ms', 800),
]);
}
return self::SUCCESS;
}