deploy: auto commit repo-root changes 2026-06-21 17:56:21

This commit is contained in:
hajimi
2026-06-21 17:56:21 +08:00
parent bb1a2ebb9e
commit 980b019809
5 changed files with 836 additions and 175 deletions
@@ -428,10 +428,20 @@ class MatchController extends BaseApiController
->order('id asc')
->select()
->toArray();
$liveMap = MatchLiveService::getLiveMapForApi(array_column($rows, 'id'));
$scheduleMap = [];
foreach ($rows as $row) {
$roundName = $row['round_name'] ?: '未分轮次';
$liveList = $liveMap[(int) $row['id']] ?? [];
$defaultLiveUrl = '';
foreach ($liveList as $line) {
$candidate = trim((string) ($line['default_play_url'] ?? ''));
if ($candidate !== '') {
$defaultLiveUrl = $candidate;
break;
}
}
if (!isset($scheduleMap[$roundName])) {
$scheduleMap[$roundName] = [
'round_name' => $roundName,
@@ -456,6 +466,8 @@ class MatchController extends BaseApiController
'match_time' => (int) $row['match_time'],
'current_minute' => $row['current_minute'],
'half_score' => $row['half_score'],
'live_list' => $liveList,
'default_live_url' => $defaultLiveUrl,
];
}