From c076d26cbb95b951c90303ea9664a501d7737c6f Mon Sep 17 00:00:00 2001 From: hgc Date: Sat, 22 Feb 2025 15:45:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E5=88=86=E9=92=9F=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E8=BD=AE=E8=AF=A2=E7=BC=93=E5=AD=98=E6=98=AF=E5=90=A6=E6=9C=89?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E5=B9=BF=E5=91=8A=E8=B4=A6=E5=8F=B7=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E7=BB=91=E5=AE=9A=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/event/GoogleAdsCustomers.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/event/GoogleAdsCustomers.php b/app/event/GoogleAdsCustomers.php index 9ed2660..994d318 100644 --- a/app/event/GoogleAdsCustomers.php +++ b/app/event/GoogleAdsCustomers.php @@ -151,15 +151,20 @@ class GoogleAdsCustomers { $redisKey = 'bps:ads:new_bind_account'; //$options['token'] 即uuid 例如:f47ac10b-58cc-4372-a567-0e02b2c3d479 // 获取哈希表所有字段和值 + if (!Redis::exists($redisKey)) { + dump('no pending uuid'); + return; + } $hashData = Redis::hGetAll($redisKey); if (empty($hashData)) { - dump('no pending bindings accounts'); - return; + dump('no pending bindings accounts'); + return; } + foreach ($hashData as $uuid => $bindingStr) { // 解析商户ID和账户列表 格式:"merchantId_platform_account1,account2" [$merchantId, $platform, $accountsStr] = explode('_', $bindingStr, 3); - if((int)$platform !== 2){ + if ((int)$platform !== 2) { continue; } // 需要实际数据来源