This commit is contained in:
wchino
2026-06-13 17:38:25 +08:00
parent e7e938f261
commit 7b33d9f9fa
190 changed files with 23222 additions and 4336 deletions

View File

@@ -92,19 +92,30 @@ export async function syncWc2026OutrightMarket(
startTime: new Date('2027-07-01T00:00:00Z'),
status: 'PUBLISHED',
publishTime: new Date(),
isHot: true,
isHot: false,
displayOrder: 0,
},
});
} else if (match.status === 'DRAFT' || match.status === 'SETTLED' || match.status === 'CLOSED') {
match = await prisma.match.update({
where: { id: match.id },
data: {
status: 'PUBLISHED',
publishTime: match.publishTime ?? new Date(),
closeTime: null,
},
});
} else {
const shouldPublish =
match.status === 'DRAFT' || match.status === 'SETTLED' || match.status === 'CLOSED';
if (match.isHot || shouldPublish) {
const updateData: {
isHot: boolean;
status?: string;
publishTime?: Date;
closeTime?: null;
} = { isHot: false };
if (shouldPublish) {
updateData.status = 'PUBLISHED';
updateData.publishTime = match.publishTime ?? new Date();
updateData.closeTime = null;
}
match = await prisma.match.update({
where: { id: match.id },
data: updateData,
});
}
}
let market = await prisma.market.findFirst({