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 a89e30f3
authored
Sep 03, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#20794 Сделать чтобы в целевых РК оставалась одна карточка
1 parent
cbe20b4d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
app/Console/Commands/BidModifiersAdd.php
app/Console/Commands/DictionaryCampaignsSyncByCampaign.php
app/Service/Requests/Direct/AddAds.php
app/Console/Commands/BidModifiersAdd.php
View file @
a89e30f
...
@@ -130,8 +130,12 @@ class BidModifiersAdd extends Command
...
@@ -130,8 +130,12 @@ class BidModifiersAdd extends Command
if
(
!
$isFindNotExternalRetargetingList
)
{
if
(
!
$isFindNotExternalRetargetingList
)
{
$goalBidModifier
->
retargeting_adjustments
=
$retargeting_adjustments
;
$goalBidModifier
->
retargeting_adjustments
=
$retargeting_adjustments
;
}
else
{
$goalBidModifier
->
retargeting_adjustments
=
[];
}
}
}
else
{
$goalBidModifier
->
retargeting_adjustments
=
[];
}
}
}
}
...
...
app/Console/Commands/DictionaryCampaignsSyncByCampaign.php
View file @
a89e30f
...
@@ -86,6 +86,7 @@ class DictionaryCampaignsSyncByCampaign extends Command
...
@@ -86,6 +86,7 @@ class DictionaryCampaignsSyncByCampaign extends Command
INNER JOIN dictionary_campaigns dc on c.id = dc.campaign_id
INNER JOIN dictionary_campaigns dc on c.id = dc.campaign_id
LEFT JOIN goal_v_cards gvc on vc.id = gvc.v_card_id AND gvc.dictionary_campaign_id = dc.id and gvc.deleted_at is null
LEFT JOIN goal_v_cards gvc on vc.id = gvc.v_card_id AND gvc.dictionary_campaign_id = dc.id and gvc.deleted_at is null
WHERE gvc.v_card_id is null
WHERE gvc.v_card_id is null
AND vc.deleted_at is null
"
);
"
);
$this
->
info
(
'goal_v_cards successful!'
);
$this
->
info
(
'goal_v_cards successful!'
);
...
...
app/Service/Requests/Direct/AddAds.php
View file @
a89e30f
...
@@ -87,6 +87,32 @@ class AddAds extends DirectRequest
...
@@ -87,6 +87,32 @@ class AddAds extends DirectRequest
continue
;
continue
;
}
elseif
(
isset
(
$add_result
[
'Errors'
][
0
][
'Code'
])
&&
$add_result
[
'Errors'
][
0
][
'Code'
]
==
8800
&&
isset
(
$add_result
[
'Errors'
][
0
][
'Details'
])
&&
$add_result
[
'Errors'
][
0
][
'Details'
]
===
'vCard not found'
)
{
if
(
$this
->
getToken
()
->
isMain
())
{
Advertisement
::
where
(
'id'
,
$goalAd
->
id
)
->
forceDelete
();
}
else
{
$model
=
GoalAdvertisement
::
with
(
'goalAdGroup'
)
->
firstWhere
(
'id'
,
$goalAd
->
id
);
if
(
$model
)
{
if
(
$model
->
goalVCard
)
{
$model
->
goalVCard
->
delete
();
}
$model
->
forceDelete
();
}
}
continue
;
}
}
Log
::
debug
(
"AddAds, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
Log
::
debug
(
"AddAds, empty Id, token_id
{
$this
->
getToken
()
->
getKey
()
}
"
);
...
...
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