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; } // 需要实际数据来源