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 e4f8ce02
authored
Aug 10, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#20697 Доработка добавления модификаторов
1 parent
acbda803
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
app/Console/Commands/BidModifiersDelete.php
app/Service/Requests/Direct/DeleteBidModifiers.php
app/Console/Commands/BidModifiersDelete.php
View file @
e4f8ce0
...
@@ -46,6 +46,7 @@ class BidModifiersDelete extends Command
...
@@ -46,6 +46,7 @@ class BidModifiersDelete extends Command
->
join
(
'dictionary_campaigns'
,
'goal_bid_modifiers.dictionary_campaign_id'
,
'='
,
'dictionary_campaigns.id'
)
->
join
(
'dictionary_campaigns'
,
'goal_bid_modifiers.dictionary_campaign_id'
,
'='
,
'dictionary_campaigns.id'
)
->
join
(
'dictionaries'
,
'dictionary_campaigns.dictionary_id'
,
'='
,
'dictionaries.id'
)
->
join
(
'dictionaries'
,
'dictionary_campaigns.dictionary_id'
,
'='
,
'dictionaries.id'
)
->
whereNotNull
(
'goal_bid_modifiers.external_id'
)
->
whereNotNull
(
'goal_bid_modifiers.external_id'
)
->
whereNull
(
'goal_bid_modifiers.deleted_at'
)
->
whereNotNull
(
'bid_modifiers.deleted_at'
)
->
whereNotNull
(
'bid_modifiers.deleted_at'
)
->
where
(
'dictionaries.token_id'
,
$token
->
id
)
->
where
(
'dictionaries.token_id'
,
$token
->
id
)
->
pluck
(
'goal_bid_modifiers.external_id'
);
->
pluck
(
'goal_bid_modifiers.external_id'
);
...
...
app/Service/Requests/Direct/DeleteBidModifiers.php
View file @
e4f8ce0
...
@@ -40,6 +40,12 @@ class DeleteBidModifiers extends DirectRequest
...
@@ -40,6 +40,12 @@ class DeleteBidModifiers extends DirectRequest
foreach
(
$response
[
'result'
][
'DeleteResults'
]
as
$key
=>
$delete_result
)
{
foreach
(
$response
[
'result'
][
'DeleteResults'
]
as
$key
=>
$delete_result
)
{
if
(
!
isset
(
$delete_result
[
'Id'
]))
{
if
(
!
isset
(
$delete_result
[
'Id'
]))
{
if
(
isset
(
$delete_result
[
'Errors'
][
0
][
'Message'
])
&&
$delete_result
[
'Errors'
][
0
][
'Message'
]
===
'Object not found'
)
{
GoalBidModifier
::
where
(
'external_id'
,
$this
->
getParams
()[
'SelectionCriteria'
][
'Ids'
][
$key
])
->
delete
();
continue
;
}
Log
::
debug
(
"DeleteBidModifier, empty Id"
);
Log
::
debug
(
"DeleteBidModifier, empty Id"
);
Log
::
debug
(
$delete_result
);
Log
::
debug
(
$delete_result
);
Log
::
debug
(
$this
->
getParams
()[
'SelectionCriteria'
][
'Ids'
][
$key
]);
Log
::
debug
(
$this
->
getParams
()[
'SelectionCriteria'
][
'Ids'
][
$key
]);
...
...
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