feat(admin,api,player): 优胜赛配置、赛事管理重构与玩家端投注体验优化
管理端拆分赛事/优胜赛 Tab,新增联赛优胜赔率面板(批量、排序、外侧删除);统一 list-chrome 工具栏对齐与列表页布局;Dashboard 失败重试、Users 操作下拉、小屏侧栏等体验修复。 API 扩展优胜赛与赛事目录接口,完善投注与钱包查询;玩家端重构赛事卡片、串关面板、注单/钱包页,新增注单详情、下注成功动画与下拉刷新。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -247,6 +247,14 @@ class CreatePlatformMatchDto {
|
||||
@IsString()
|
||||
leagueMs?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
homeTeamCode?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
awayTeamCode?: string;
|
||||
|
||||
@IsString()
|
||||
homeTeamEn!: string;
|
||||
|
||||
@@ -471,6 +479,11 @@ class AddOutrightSelectionDto {
|
||||
logoUrl?: string;
|
||||
}
|
||||
|
||||
class AddOutrightSelectionsBatchDto {
|
||||
@IsArray()
|
||||
items!: AddOutrightSelectionDto[];
|
||||
}
|
||||
|
||||
class UpdateOutrightSelectionTeamDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@@ -983,6 +996,15 @@ export class AdminController {
|
||||
return jsonResponse(result);
|
||||
}
|
||||
|
||||
@Get('leagues/:leagueId/outright')
|
||||
@RequirePermissions(P.matches, P.reports)
|
||||
async getLeagueOutright(@Param('leagueId') leagueId: string) {
|
||||
const data = await this.outright.getOrCreateAndSyncForLeague(
|
||||
BigInt(leagueId),
|
||||
);
|
||||
return jsonResponse(data);
|
||||
}
|
||||
|
||||
@Get('leagues/:leagueId/matches')
|
||||
@RequirePermissions(P.matches, P.reports)
|
||||
async listLeagueMatches(
|
||||
@@ -1096,6 +1118,8 @@ export class AdminController {
|
||||
leagueEn: dto.leagueEn ?? '',
|
||||
leagueZh: dto.leagueZh ?? '',
|
||||
leagueMs: dto.leagueMs,
|
||||
homeTeamCode: dto.homeTeamCode,
|
||||
awayTeamCode: dto.awayTeamCode,
|
||||
homeTeamEn: dto.homeTeamEn,
|
||||
homeTeamZh: dto.homeTeamZh,
|
||||
homeTeamMs: dto.homeTeamMs,
|
||||
@@ -1319,6 +1343,22 @@ export class AdminController {
|
||||
return jsonResponse(data);
|
||||
}
|
||||
|
||||
@Post('outrights/:matchId/selections/batch')
|
||||
@RequirePermissions(P.matches)
|
||||
async addOutrightSelectionsBatch(
|
||||
@Param('matchId') matchId: string,
|
||||
@Body() dto: AddOutrightSelectionsBatchDto,
|
||||
) {
|
||||
if (!dto.items?.length) {
|
||||
throw new BadRequestException('At least one team required');
|
||||
}
|
||||
const data = await this.outright.addSelectionsBatch(
|
||||
BigInt(matchId),
|
||||
dto.items,
|
||||
);
|
||||
return jsonResponse(data);
|
||||
}
|
||||
|
||||
@Patch('outrights/:matchId/selections/:selectionId')
|
||||
@RequirePermissions(P.matches)
|
||||
async updateOutrightSelectionTeam(
|
||||
|
||||
Reference in New Issue
Block a user