Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5325dac4
authored
Jan 24, 2022
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#22080 Физически удалены РК с целевых токенах
1 parent
b863e82a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletions
app/Console/Commands/DictionaryCampaignsSyncByCampaign.php
app/Service/Requests/Direct/ArchiveAds.php
app/Console/Commands/DictionaryCampaignsSyncByCampaign.php
View file @
5325dac
...
@@ -377,6 +377,26 @@ class DictionaryCampaignsSyncByCampaign extends Command
...
@@ -377,6 +377,26 @@ class DictionaryCampaignsSyncByCampaign extends Command
$this
->
info
(
'update goal_advertisements.dictionary_campaign_external_id successful!'
);
$this
->
info
(
'update goal_advertisements.dictionary_campaign_external_id successful!'
);
DB
::
update
(
"
DB
::
update
(
"
UPDATE goal_advertisements ga
INNER JOIN goal_sitelinks gs on ga.goal_sitelink_id = gs.id AND gs.external_id is not null AND gs.updated_need is null AND gs.deleted_at is null
SET ga.goal_sitelink_external_id = gs.external_id,
ga.updated_at = CURRENT_TIMESTAMP
WHERE ga.deleted_at IS NULL
AND ga.goal_sitelink_external_id IS NULL
"
);
$this
->
info
(
'update goal_advertisements.goal_sitelink_external_id successful!'
);
DB
::
update
(
"
UPDATE goal_advertisements ga
LEFT JOIN goal_v_cards gvc on ga.goal_v_card_id = gvc.id AND gvc.external_id is not null AND gvc.deleted_at is null
SET ga.goal_v_card_external_id = gvc.external_id,
ga.updated_at = CURRENT_TIMESTAMP
WHERE ga.deleted_at IS NULL
AND ga.goal_v_card_external_id IS NULL
"
);
$this
->
info
(
'update goal_advertisements.goal_v_card_external_id successful!'
);
DB
::
update
(
"
UPDATE goal_bid_modifiers gbm
UPDATE goal_bid_modifiers gbm
INNER JOIN dictionary_campaigns dc ON dc.id = gbm.dictionary_campaign_id AND dc.external_id IS NOT NULL AND dc.deleted_at IS NULL
INNER JOIN dictionary_campaigns dc ON dc.id = gbm.dictionary_campaign_id AND dc.external_id IS NOT NULL AND dc.deleted_at IS NULL
SET gbm.dictionary_campaign_external_id = dc.external_id,
SET gbm.dictionary_campaign_external_id = dc.external_id,
...
...
app/Service/Requests/Direct/ArchiveAds.php
View file @
5325dac
...
@@ -78,7 +78,15 @@ class ArchiveAds extends DirectRequest
...
@@ -78,7 +78,15 @@ class ArchiveAds extends DirectRequest
* ),
* ),
* )
* )
*/
*/
if
(
isset
(
$archive_result
[
'Errors'
][
0
][
'Code'
])
==
8300
)
{
if
(
isset
(
$archive_result
[
'Errors'
][
0
][
'Code'
])
&&
$archive_result
[
'Errors'
][
0
][
'Code'
]
==
8300
&&
isset
(
$add_result
[
'Errors'
][
0
][
'Details'
])
&&
$archive_result
[
'Errors'
][
0
][
'Details'
]
===
'Ad is a draft and cannot be archived'
)
{
if
(
$this
->
getToken
()
->
isMain
())
{
if
(
$this
->
getToken
()
->
isMain
())
{
Advertisement
::
whereExternalId
(
$external_id
)
Advertisement
::
whereExternalId
(
$external_id
)
->
update
([
->
update
([
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment