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 29956596
authored
Sep 13, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#20794 Сделать чтобы в целевых РК оставалась одна карточка
1 parent
2e2195e1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
app/Console/Commands/DictionaryCampaignsSyncByCampaign.php
app/Service/Requests/Direct/AddAdImages.php
app/Service/Requests/Direct/AddKeywords.php
app/Console/Commands/DictionaryCampaignsSyncByCampaign.php
View file @
2995659
...
@@ -63,6 +63,7 @@ class DictionaryCampaignsSyncByCampaign extends Command
...
@@ -63,6 +63,7 @@ class DictionaryCampaignsSyncByCampaign extends Command
INNER JOIN tokens t on t.type != '"
.
Tokens
::
MAIN
.
"'
INNER JOIN tokens t on t.type != '"
.
Tokens
::
MAIN
.
"'
LEFT JOIN goal_ad_images gai on ai.id = gai.ad_image_id and t.id = gai.token_id
LEFT JOIN goal_ad_images gai on ai.id = gai.ad_image_id and t.id = gai.token_id
WHERE gai.id is null and gai.deleted_at is null
WHERE gai.id is null and gai.deleted_at is null
AND ai.hash != 'IJUw9SYfLo1BvIqO_xnP5A'
"
);
"
);
$this
->
info
(
'goal_ad_images successful!'
);
$this
->
info
(
'goal_ad_images successful!'
);
...
...
app/Service/Requests/Direct/AddAdImages.php
View file @
2995659
...
@@ -64,7 +64,7 @@ class AddAdImages extends DirectRequest
...
@@ -64,7 +64,7 @@ class AddAdImages extends DirectRequest
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'service'
=>
$this
->
getService
(),
'service'
=>
$this
->
getService
(),
'method'
=>
$this
->
getMethod
(),
'method'
=>
$this
->
getMethod
(),
'params'
=>
$data
,
'params'
=>
[
'Name'
=>
$data
[
'Name'
]]
,
'errors'
=>
$add_result
[
'Errors'
],
'errors'
=>
$add_result
[
'Errors'
],
]);
]);
...
...
app/Service/Requests/Direct/AddKeywords.php
View file @
2995659
...
@@ -83,18 +83,22 @@ class AddKeywords extends DirectRequest
...
@@ -83,18 +83,22 @@ class AddKeywords extends DirectRequest
continue
;
continue
;
}
elseif
(
isset
(
$add_result
[
'Errors'
])
&&
count
(
$add_result
[
'Errors'
]))
{
}
elseif
(
isset
(
$add_result
[
'Errors'
])
&&
count
(
$add_result
[
'Errors'
]))
{
$goalKeyword
->
errors
()
->
create
([
$model
=
GoalKeyword
::
whereId
(
$goalKeyword
->
id
)
->
first
();
if
(
$model
)
{
$model
->
errors
()
->
create
([
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'token_id'
=>
$this
->
getToken
()
->
getKey
(),
'service'
=>
$this
->
getService
(),
'service'
=>
$this
->
getService
(),
'method'
=>
$this
->
getMethod
(),
'method'
=>
$this
->
getMethod
(),
'params'
=>
$data
,
'params'
=>
$data
,
'errors'
=>
$add_result
[
'Errors'
],
'errors'
=>
$add_result
[
'Errors'
],
]);
]);
$goalKeyword
->
update
([
$model
->
update
([
'reserve_create_at'
=>
null
,
'reserve_create_at'
=>
null
,
]);
]);
continue
;
continue
;
}
}
}
Log
::
debug
(
"AddKeywords, empty Id"
);
Log
::
debug
(
"AddKeywords, empty Id"
);
Log
::
debug
(
$add_result
);
Log
::
debug
(
$add_result
);
...
...
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