每分钟定时轮询缓存是否有新的广告账号需要绑定 2
This commit is contained in:
parent
066c04a6cd
commit
c076d26cbb
@ -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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
// 需要实际数据来源
|
||||
|
Loading…
Reference in New Issue
Block a user