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 3631766d
authored
Jun 09, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#19472 Синхронизация групп с целевыми
1 parent
88186ddc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
app/Console/Commands/CampaignsLoadGroups.php
app/Service/Requests/Direct/GetAdGroups.php
app/Console/Commands/CampaignsLoadGroups.php
View file @
3631766
...
@@ -42,7 +42,7 @@ class CampaignsLoadGroups extends Command
...
@@ -42,7 +42,7 @@ class CampaignsLoadGroups extends Command
*/
*/
public
function
handle
()
public
function
handle
()
{
{
$campaigns
=
Campaigns
::
forGroupsLoadable
()
->
get
();
$campaigns
=
Campaigns
::
for
Managed
()
->
forEnabled
()
->
for
GroupsLoadable
()
->
get
();
if
(
!
$campaigns
->
count
())
{
if
(
!
$campaigns
->
count
())
{
return
;
return
;
}
}
...
...
app/Service/Requests/Direct/GetAdGroups.php
View file @
3631766
...
@@ -84,7 +84,7 @@ class GetAdGroups extends DirectRequest
...
@@ -84,7 +84,7 @@ class GetAdGroups extends DirectRequest
foreach
(
$response
[
'result'
][
'AdGroups'
]
as
$ad_group
)
{
foreach
(
$response
[
'result'
][
'AdGroups'
]
as
$ad_group
)
{
$campaign
=
$campaigns
->
get
(
$ad_group
[
'CampaignId'
]);
$campaign
=
$campaigns
->
firstWhere
(
'external_id'
,
$ad_group
[
'CampaignId'
]);
if
(
!
$campaign
)
if
(
!
$campaign
)
continue
;
continue
;
...
...
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