feat(admin,api,player): 结算预览分页、统计图表与返水限额
完善结算计算与预览 API(含后端分页),加强管理端结算/返水/权限,并优化玩家端投注单与队徽展示。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user