feat(admin,api,player): smart score solver, disable settlement UI, misc fixes
This commit is contained in:
@@ -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 } } },
|
||||
|
||||
Reference in New Issue
Block a user