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 02efb319
authored
Aug 11, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#20709 Восстановление ключевых фраз
1 parent
e4f8ce02
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
12 deletions
app/Console/Commands/DictionaryCampaignsSyncByCampaign.php
app/Models/Keyword.php
app/Service/Requests/Direct/DeleteKeywords.php
app/Service/Requests/Direct/GetAudienceTargets.php
app/Service/Requests/Direct/GetKeywords.php
app/Console/Commands/DictionaryCampaignsSyncByCampaign.php
View file @
02efb31
...
@@ -2,14 +2,9 @@
...
@@ -2,14 +2,9 @@
namespace
App\Console\Commands
;
namespace
App\Console\Commands
;
use
App\Models\AdGroup
;
use
App\Models\Advertisement
;
use
App\Models\Advertisement
;
use
App\Models\Campaigns
;
use
App\Models\Dictionary
;
use
App\Models\Dictionary
;
use
App\Models\Keyword
;
use
App\Models\Pivots\DictionaryCampaign
;
use
App\Models\Pivots\DictionaryCampaign
;
use
App\Models\Pivots\GoalAdGroup
;
use
App\Models\Pivots\GoalKeyword
;
use
App\Models\Tokens
;
use
App\Models\Tokens
;
use
Illuminate\Console\Command
;
use
Illuminate\Console\Command
;
use
Illuminate\Support\Facades\DB
;
use
Illuminate\Support\Facades\DB
;
...
...
app/Models/Keyword.php
View file @
02efb31
...
@@ -89,6 +89,8 @@ class Keyword extends Model
...
@@ -89,6 +89,8 @@ class Keyword extends Model
'status'
,
'status'
,
'serving_status'
,
'serving_status'
,
'updated_self'
,
'updated_self'
,
'updated_at'
,
'deleted_at'
,
];
];
protected
$casts
=
[
protected
$casts
=
[
...
...
app/Service/Requests/Direct/DeleteKeywords.php
View file @
02efb31
...
@@ -81,7 +81,6 @@ class DeleteKeywords extends DirectRequest
...
@@ -81,7 +81,6 @@ class DeleteKeywords extends DirectRequest
'Ids'
=>
$params
[
'ids'
],
'Ids'
=>
$params
[
'ids'
],
],
],
];
];
Log
::
debug
(
$params
);
$this
->
setParams
(
$params
);
$this
->
setParams
(
$params
);
}
}
...
...
app/Service/Requests/Direct/GetAudienceTargets.php
View file @
02efb31
...
@@ -3,13 +3,10 @@
...
@@ -3,13 +3,10 @@
namespace
App\Service\Requests\Direct
;
namespace
App\Service\Requests\Direct
;
use
App\Jobs\ProcessCallLimitedAPI
;
use
App\Jobs\ProcessCallLimitedAPI
;
use
App\Models\AdExtension
;
use
App\Models\AdGroup
;
use
App\Models\AdGroup
;
use
App\Models\Advertisement
;
use
App\Models\AudienceTarget
;
use
App\Models\AudienceTarget
;
use
App\Models\Campaigns
;
use
App\Models\Campaigns
;
use
App\Models\Retargetinglist
;
use
App\Models\Retargetinglist
;
use
App\Models\Sitelink
;
use
App\Service\Contract\APIRequest
;
use
App\Service\Contract\APIRequest
;
use
App\Service\Requests\DirectRequest
;
use
App\Service\Requests\DirectRequest
;
use
Carbon\Carbon
;
use
Carbon\Carbon
;
...
...
app/Service/Requests/Direct/GetKeywords.php
View file @
02efb31
...
@@ -121,8 +121,8 @@ class GetKeywords extends DirectRequest
...
@@ -121,8 +121,8 @@ class GetKeywords extends DirectRequest
'state'
=>
$keyword
[
'State'
],
'state'
=>
$keyword
[
'State'
],
'status'
=>
$keyword
[
'Status'
],
'status'
=>
$keyword
[
'Status'
],
'serving_status'
=>
$keyword
[
'ServingStatus'
],
'serving_status'
=>
$keyword
[
'ServingStatus'
],
'updated_at'
=>
$now
,
'updated_at'
=>
$now
,
'deleted_at'
=>
null
//не забыть убрать признак удаления, если вдруг опять пришла удаленная ранее фраза
'deleted_at'
=>
null
//не забыть убрать признак удаления, если вдруг опять пришла удаленная ранее фраза
];
];
$keyword_data
=
Keyword
::
where
(
'external_id'
,
$external_id
)
->
get
()
->
first
();
$keyword_data
=
Keyword
::
where
(
'external_id'
,
$external_id
)
->
get
()
->
first
();
...
@@ -154,7 +154,7 @@ class GetKeywords extends DirectRequest
...
@@ -154,7 +154,7 @@ class GetKeywords extends DirectRequest
}
}
Keyword
::
insertOrIgnore
(
$data
);
Keyword
::
insertOrIgnore
(
$data
);
Keyword
::
whereIn
(
'external_id'
,
$items
)
->
update
([
Keyword
::
whereIn
(
'external_id'
,
$items
)
->
update
([
'updated_at'
=>
$now
'updated_at'
=>
$now
]);
]);
}
}
...
...
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