deploy: auto commit server changes 2026-07-10 00:14:05

This commit is contained in:
hajimi
2026-07-10 00:14:05 +08:00
parent 76ef84aa8f
commit ad597d0a79
@@ -556,6 +556,11 @@ class MatchController extends BaseApiController
$eventMap = $this->buildWorldCupEventMap(); $eventMap = $this->buildWorldCupEventMap();
$matches = []; $matches = [];
foreach ($rows as $row) { foreach ($rows as $row) {
$platform = $this->formatOddsPlatform($row);
if (empty($platform['markets'])) {
continue;
}
$matchKey = $this->buildOddsMatchKey($row); $matchKey = $this->buildOddsMatchKey($row);
if (!isset($matches[$matchKey])) { if (!isset($matches[$matchKey])) {
$event = $eventMap[$this->buildTeamPairKey($row['home_team'] ?? '', $row['away_team'] ?? '')] ?? []; $event = $eventMap[$this->buildTeamPairKey($row['home_team'] ?? '', $row['away_team'] ?? '')] ?? [];
@@ -580,11 +585,13 @@ class MatchController extends BaseApiController
} }
$matches[$matchKey]['source_match_ids'][] = (string)$row['source_match_id']; $matches[$matchKey]['source_match_ids'][] = (string)$row['source_match_id'];
$matches[$matchKey]['platforms'][] = $this->formatOddsPlatform($row); $matches[$matchKey]['platforms'][] = $platform;
$matches[$matchKey]['update_time'] = max((int)$matches[$matchKey]['update_time'], (int)$row['update_time']); $matches[$matchKey]['update_time'] = max((int)$matches[$matchKey]['update_time'], (int)$row['update_time']);
} }
$list = array_values($matches); $list = array_values(array_filter($matches, function ($item) {
return !empty($item['platforms']);
}));
foreach ($list as &$item) { foreach ($list as &$item) {
$item['source_match_ids'] = array_values(array_unique($item['source_match_ids'])); $item['source_match_ids'] = array_values(array_unique($item['source_match_ids']));
usort($item['platforms'], function ($left, $right) { usort($item['platforms'], function ($left, $right) {