feat(admin,api,player): smart score solver, disable settlement UI, misc fixes

This commit is contained in:
2026-06-04 17:56:32 +08:00
parent 9fcee31a9a
commit 6264b8806c
12 changed files with 356 additions and 16 deletions

View File

@@ -12,6 +12,19 @@ import {
FT_CORRECT_SCORE_TEMPLATE,
HT_CORRECT_SCORE_TEMPLATE,
} from './domain/settlement-calculator';
// 智能比分推荐已关闭
// import { suggestScoresForBets, type SmartScoreSimBet, type SmartScoreStrategy } from './smart-score.solver';
function resolveSelectionCodeFromLeg(
selectionCode: string | null | undefined,
nameSnapshot: string,
): string {
if (selectionCode?.trim()) return selectionCode.trim();
if (nameSnapshot.includes('-')) {
return `SCORE_${nameSnapshot.replace('-', '_')}`;
}
return nameSnapshot;
}
@Injectable()
export class SettlementService {
@@ -429,6 +442,10 @@ export class SettlementService {
};
}
/* 智能比分推荐已关闭 — 恢复时取消注释并恢复 smart-score.solver import
async suggestSmartScores(...) { ... }
*/
async voidMatchBets(matchId: bigint) {
const bets = await this.prisma.bet.findMany({
where: { status: 'PENDING', selections: { some: { matchId } } },