google广告账号增加同步币种
This commit is contained in:
parent
19a7ccc54a
commit
9f5cd5a1f1
@ -96,7 +96,7 @@ class GoogleAdsCustomers
|
||||
try {
|
||||
// 获取当前 rootAccountId 的所有账户
|
||||
$allAccountsByRoot = $this->googleAdsAccountService->runGetAccountHierarchy($option);
|
||||
dump($allAccountsByRoot,333);
|
||||
// dump($allAccountsByRoot,333);
|
||||
foreach ($allAccountsByRoot as $rootId => $accounts) {
|
||||
foreach ($accounts as $account) {
|
||||
$this->googleOAuthService->saveThirdUserAdvertiser(
|
||||
|
@ -740,6 +740,7 @@ class GoogleAdsAccountService extends BaseService
|
||||
'descriptive_name' => $customerClient->getDescriptiveName(),
|
||||
'manager' => $customerClient->getManager(),
|
||||
'test_account' => $customerClient->getTestAccount(),
|
||||
'currency' => $customerClient->getCurrencyCode(),
|
||||
];
|
||||
|
||||
// Recursively call this function for all child accounts of $customerClient.
|
||||
|
@ -104,6 +104,7 @@ class GoogleOAuthService
|
||||
'advertiser_name' => $customer['descriptive_name'],
|
||||
'google_login_customer_id' => $login_customer_id,
|
||||
'merchant_id' => $merchant_id,
|
||||
'currency' => $customer['currency'],
|
||||
];
|
||||
if ($customer['manager'] === true) {
|
||||
$data['google_manager'] = 't';
|
||||
@ -118,14 +119,15 @@ class GoogleOAuthService
|
||||
// dump($data);
|
||||
$sql = "
|
||||
INSERT INTO {$tableName}
|
||||
(advertiser_id,advertiser_name, doc_,google_login_customer_id,google_manager,google_test_account,merchant_id)
|
||||
VALUES (:advertiser_id, :advertiser_name,:doc_,:google_login_customer_id,:google_manager,:google_test_account,:merchant_id)
|
||||
(advertiser_id,advertiser_name, doc_,google_login_customer_id,google_manager,google_test_account,merchant_id,currency)
|
||||
VALUES (:advertiser_id, :advertiser_name,:doc_,:google_login_customer_id,:google_manager,:google_test_account,:merchant_id,:currency)
|
||||
ON CONFLICT (advertiser_id,doc_)
|
||||
DO UPDATE SET
|
||||
advertiser_name = EXCLUDED.advertiser_name,
|
||||
google_login_customer_id = EXCLUDED.google_login_customer_id,
|
||||
google_manager = EXCLUDED.google_manager,
|
||||
google_test_account = EXCLUDED.google_test_account,
|
||||
currency = EXCLUDED.currency,
|
||||
merchant_id = EXCLUDED.merchant_id
|
||||
";
|
||||
// dump($sql,$data);
|
||||
|
Loading…
Reference in New Issue
Block a user