diff --git a/server/app/api/controller/MatchController.php b/server/app/api/controller/MatchController.php index 5ce69e0..da93490 100644 --- a/server/app/api/controller/MatchController.php +++ b/server/app/api/controller/MatchController.php @@ -556,6 +556,11 @@ class MatchController extends BaseApiController $eventMap = $this->buildWorldCupEventMap(); $matches = []; foreach ($rows as $row) { + $platform = $this->formatOddsPlatform($row); + if (empty($platform['markets'])) { + continue; + } + $matchKey = $this->buildOddsMatchKey($row); if (!isset($matches[$matchKey])) { $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]['platforms'][] = $this->formatOddsPlatform($row); + $matches[$matchKey]['platforms'][] = $platform; $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) { $item['source_match_ids'] = array_values(array_unique($item['source_match_ids'])); usort($item['platforms'], function ($left, $right) {