feat(admin,api,player): 结算预览分页、统计图表与返水限额

完善结算计算与预览 API(含后端分页),加强管理端结算/返水/权限,并优化玩家端投注单与队徽展示。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-05 13:54:33 +08:00
parent 6264b8806c
commit efff7c27e6
40 changed files with 3560 additions and 578 deletions

View File

@@ -16,6 +16,8 @@ export interface SettlementInput {
totalLine?: number | null;
score: ScoreInput;
templateScores?: string[];
/** 冠军盘:获胜球队 code如 FRA、BRA */
winnerTeamCode?: string | null;
}
export function getShScore(score: ScoreInput): { home: number; away: number } {
@@ -196,7 +198,8 @@ export function settleSelection(input: SettlementInput): SelectionResult {
return settleCorrectScore(sh.home, sh.away, selectionCode, templates);
}
case 'OUTRIGHT_WINNER':
return selectionCode === `TEAM_${input.score.ftHome}` ? 'WIN' : 'LOSE';
if (!input.winnerTeamCode) return 'LOSE';
return selectionCode === input.winnerTeamCode ? 'WIN' : 'LOSE';
}
return 'LOSE';