From 07397956a2d392dc2cf476212daaa9544891b3e2 Mon Sep 17 00:00:00 2001 From: jcadmin Date: Tue, 25 Feb 2025 22:32:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=BB=B6=E8=BF=9F=E6=AF=94?= =?UTF-8?q?=E8=B5=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/Zq/SyncCtzq.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/Zq/SyncCtzq.php b/app/Console/Commands/Zq/SyncCtzq.php index b8c2e9e9..9d14bc0a 100755 --- a/app/Console/Commands/Zq/SyncCtzq.php +++ b/app/Console/Commands/Zq/SyncCtzq.php @@ -101,7 +101,8 @@ class SyncCtzq extends Command if (!$matches) { return; } - + $matchIds = array_column($matches, 'matchId'); + CtzqJqcMatch::where('ctzq_jqc_id', $ctzq->id)->whereNotIn('match_id', $matchIds)->delete(); foreach ($matches as $item) { $match = CtzqJqcMatch::where('ctzq_jqc_id', $ctzq->id)->where('match_id', $item['matchId'])->first(); if (!$match) { @@ -163,7 +164,8 @@ class SyncCtzq extends Command if (!$matches) { return; } - + $matchIds = array_column($matches, 'matchId'); + CtzqBqcMatch::where('ctzq_bqc_id', $ctzq->id)->whereNotIn('match_id', $matchIds)->delete(); foreach ($matches as $item) { $match = CtzqBqcMatch::where('ctzq_bqc_id', $ctzq->id)->where('match_id', $item['matchId'])->first(); if (!$match) { @@ -234,7 +236,8 @@ class SyncCtzq extends Command if (!$matches) { return; } - + $matchIds = array_column($matches, 'matchId'); + CtzqSfcMatch::where('ctzq_sfc_id', $ctzqSfc->id)->whereNotIn('match_id', $matchIds)->delete(); foreach ($matches as $item) { $match = CtzqSfcMatch::where('ctzq_sfc_id', $ctzqSfc->id)->where('match_id', $item['matchId'])->first(); if (!$match) {