refactor: 迁移彩票设置至 LotterySettings 服务
- 更新多个控制器和服务,使用 LotterySettings 服务获取彩票相关配置,如默认币种、开奖间隔、下注窗口等,提升代码一致性与可维护性。 - 移除 .env.example 中不再使用的配置项,建议通过后台管理进行设置。
This commit is contained in:
@@ -10,6 +10,7 @@ use App\Models\DrawResultItem;
|
||||
use App\Models\DrawResultBatch;
|
||||
use App\Lottery\DrawResultBatchStatus;
|
||||
use App\Services\Jackpot\JackpotSummaryService;
|
||||
use App\Services\LotterySettings;
|
||||
|
||||
/**
|
||||
* `GET draw/current` 与大厅 WS 快照共用数据结构。
|
||||
@@ -237,7 +238,7 @@ final class DrawHallSnapshotBuilder
|
||||
|
||||
$effectiveStatus = $this->effectiveHallDisplayStatus($target, $nowUtc);
|
||||
|
||||
$scheduleTz = (string) config('lottery.draw.timezone', 'UTC');
|
||||
$scheduleTz = LotterySettings::drawTimezone();
|
||||
|
||||
$payload = [
|
||||
'schedule_timezone' => $scheduleTz,
|
||||
@@ -324,6 +325,6 @@ final class DrawHallSnapshotBuilder
|
||||
return $code;
|
||||
}
|
||||
|
||||
return strtoupper(substr(trim((string) config('lottery.default_currency', 'NPR')), 0, 16));
|
||||
return LotterySettings::defaultCurrency();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user