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 1b0bedca
authored
Jul 01, 2021
by
Евгений
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Доработал обновление фраз
1 parent
5bee8571
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
2 deletions
app/Console/Commands/KeywordsUpdate.php
app/Models/AdGroup.php
app/Models/Pivots/GoalKeyword.php
app/Service/Requests/Direct/UpdateKeywords.php
app/Console/Commands/KeywordsUpdate.php
View file @
1b0bedc
...
...
@@ -61,6 +61,7 @@ class KeywordsUpdate extends Command
$factory
->
setToken
(
$token
);
$goalKeywords
=
GoalKeyword
::
getForUpdate
(
$token
);
if
(
$goalKeywords
->
isEmpty
())
continue
;
foreach
(
array_chunk
(
$goalKeywords
->
pluck
(
'id'
)
->
toArray
(),
1000
)
as
$items
){
GoalKeyword
::
whereIn
(
'id'
,
$items
)
...
...
app/Models/AdGroup.php
View file @
1b0bedc
...
...
@@ -172,7 +172,7 @@ class AdGroup extends Model
*/
public
function
scopeForUpdatedSelf
(
$query
)
{
return
$query
->
whereNotNull
(
"
{
$query
->
getModel
()
->
getTable
()
}
.
updated_self"
);
return
$query
->
whereNotNull
(
"updated_self"
);
}
/**
...
...
app/Models/Pivots/GoalKeyword.php
View file @
1b0bedc
...
...
@@ -196,6 +196,7 @@ class GoalKeyword extends Pivot
->
whereIn
(
'goal_keywords.dictionary_campaign_id'
,
$token
->
dictionaryCampaignsEnabledForExternalSynchronized
->
pluck
(
'id'
))
->
select
([
'goal_keywords.id as id'
,
'goal_keywords.external_id'
,
'goal_keywords.dictionary_campaign_id as dictionary_campaign_id'
,
'keywords.keyword as keyword'
,
'keywords.user_param_1 as user_param_1'
,
...
...
app/Service/Requests/Direct/UpdateKeywords.php
View file @
1b0bedc
...
...
@@ -94,7 +94,6 @@ class UpdateKeywords extends DirectRequest
}
else
{
$list
=
$lists
[
$goalKeyword
->
dictionary_campaign_id
];
}
$data
=
[
'Id'
=>
$goalKeyword
->
external_id
,
'Keyword'
=>
StrReplaceByVariables
::
getInstance
(
$goalKeyword
->
keyword
,
$list
)
->
get
(),
...
...
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