feat(catalog): 玩家端隐藏已结算赛事与冠军盘联赛

- listPublished/listUpcomingPublished 排除 SETTLED 及冠军盘已结算联赛

- outright.listForPlayer 仅返回 PUBLISHED

- 首页 todayMatches 过滤 SETTLED;管理端已结算冠军盘隐藏下架按钮

- 补充 matches/outright 单测
This commit is contained in:
2026-06-23 15:01:54 +08:00
parent 0c5541fc57
commit 00b32af5fe
6 changed files with 111 additions and 6 deletions

View File

@@ -198,7 +198,8 @@ export class PlayerController {
const hotMatches = (allMatches as Array<{ isHot?: boolean; status?: string }>).filter(
(m) => m.isHot && m.status !== 'SETTLED',
);
const todayMatches = (allMatches as Array<{ startTime: string }>).filter((m) => {
const todayMatches = (allMatches as Array<{ startTime: string; status?: string }>).filter((m) => {
if (m.status === 'SETTLED') return false;
const kickoff = new Date(m.startTime);
return !Number.isNaN(kickoff.getTime()) && isInLocalTodayMatchWindow(kickoff, now, timeZone);
});