feat: 增强开奖与设置控制器的币种支持功能
引入 CurrencyResolver,用于在 DrawCurrentController、DrawResultShowController 与 DrawResultsIndexController 中统一处理币种代码解析。 更新 DrawHallSnapshotBuilder 与 DrawResultViewService 的构建方法,新增币种代码参数支持,确保开奖相关功能中的币种处理一致性。 增强 SettingIndexController:新增允许访问的 KV 配置分组校验。 在 OddsStreamService、PlayConfigStreamService 与 RiskCapStreamService 中新增广播功能,用于在玩法目录变更时推送更新通知。 新增测试用例,验证风险限额发布的广播行为。
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Services\Draw;
|
||||
|
||||
use App\Events\OddsUpdateBroadcast;
|
||||
use App\Events\PlayCatalogUpdatedBroadcast;
|
||||
use App\Events\PlayToggleBroadcast;
|
||||
use App\Events\RiskSoldOutBroadcast;
|
||||
use App\Events\RiskWarningBroadcast;
|
||||
@@ -118,6 +119,30 @@ final class LotteryHallRealtimeBroadcaster
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* `play.catalog_updated` —— 玩法/赔率/封顶版本发布(全量目录变更)。
|
||||
*
|
||||
* @param string $module play_config|odds|risk_cap
|
||||
*/
|
||||
public function notifyPlayCatalogUpdated(
|
||||
string $module,
|
||||
int $versionId,
|
||||
string $versionLabel,
|
||||
?array $meta = null,
|
||||
): void {
|
||||
if (! $this->driverSupportsRealtime()) {
|
||||
return;
|
||||
}
|
||||
|
||||
broadcast(new PlayCatalogUpdatedBroadcast(
|
||||
$module,
|
||||
$versionId,
|
||||
$versionLabel,
|
||||
$meta,
|
||||
(int) floor(microtime(true) * 1000),
|
||||
));
|
||||
}
|
||||
|
||||
/** `odds.update` —— 赔率变更 */
|
||||
public function notifyOddsUpdate(int $versionId, string $versionName, ?array $diff = null): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user