refactor: 迁移彩票设置至 LotterySettings 服务
- 更新多个控制器和服务,使用 LotterySettings 服务获取彩票相关配置,如默认币种、开奖间隔、下注窗口等,提升代码一致性与可维护性。 - 移除 .env.example 中不再使用的配置项,建议通过后台管理进行设置。
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Console\Commands;
|
||||
use App\Models\Draw;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Console\Command;
|
||||
use App\Services\LotterySettings;
|
||||
use App\Services\Draw\DrawPlannerService;
|
||||
|
||||
/**
|
||||
@@ -22,7 +23,7 @@ final class LotteryPerfDrawScheduleAuditCommand extends Command
|
||||
{
|
||||
$samples = max(2, (int) $this->option('samples'));
|
||||
$tolerance = max(0, (int) $this->option('tolerance-seconds'));
|
||||
$intervalMinutes = (int) config('lottery.draw.interval_minutes', 5);
|
||||
$intervalMinutes = LotterySettings::drawIntervalMinutes();
|
||||
$expectedSeconds = $intervalMinutes * 60;
|
||||
|
||||
$planner->ensureBuffer(Carbon::now('UTC'));
|
||||
|
||||
Reference in New Issue
Block a user