This commit is contained in:
hgc 2025-02-22 21:55:39 +08:00
parent a282acc437
commit 9d51e7fc70

View File

@ -60,11 +60,11 @@ class BpsAdAccountService
$query->where('bamr.account_id', $account_id); $query->where('bamr.account_id', $account_id);
} }
// 选择需要的字段 // 选择需要的字段
$customers = $query->field('bamr.account_id, bamr.refresh_token, bamr.ext_info->>\'login_customer_id\' as login_customer_id') $customers = $query->field('bamr.account_id, bamr.refresh_token, COALESCE(CAST(bamr.ext_info->>\'login_customer_id\' AS INT), 0) as login_customer_id')
->select(); // 执行查询 ->select(); // 执行查询
} else { } else {
// 获取符合条件的客户ID数组 // 获取符合条件的客户ID数组
$customers = ThirdUserAdvertiser::alias('bamr') $customers = BpsAdsMerchantRelation::alias('bamr')
->where('bamr.platform', 2) ->where('bamr.platform', 2)
->where('bamr.is_unbind', 'f') ->where('bamr.is_unbind', 'f')
->where('bamr.is_del', 'f') ->where('bamr.is_del', 'f')