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 96a0c598
authored
Dec 06, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#21467 Удаление ретаргетинга компаний
1 parent
3884f673
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
30 additions
and
29 deletions
app/Console/Commands/AdExtensionsAdd.php
app/Console/Commands/AdGroupsAdd.php
app/Console/Commands/AdGroupsDelete.php
app/Console/Commands/AdGroupsLoadKeywords.php
app/Console/Commands/AdGroupsUpdate.php
app/Console/Commands/AdImagesAdd.php
app/Console/Commands/AdvertisementsAdd.php
app/Console/Commands/AdvertisementsArchive.php
app/Console/Commands/AdvertisementsDelete.php
app/Console/Commands/AdvertisementsUpdate.php
app/Console/Commands/AudienceTargetsAdd.php
app/Console/Commands/AudienceTargetsDelete.php
app/Console/Commands/BidModifiersAdd.php
app/Console/Commands/BidModifiersUpdate.php
app/Console/Commands/CampaignsAdd.php
app/Console/Commands/CampaignsResume.php
app/Console/Commands/CampaignsSuspend.php
app/Console/Commands/CampaignsUpdate.php
app/Console/Commands/KeywordsAdd.php
app/Console/Commands/KeywordsDelete.php
app/Console/Commands/KeywordsUpdate.php
app/Console/Commands/NegativeKeywordSharedSetsAdd.php
app/Console/Commands/NegativeKeywordSharedSetsUpdate.php
app/Console/Commands/RetargetinglistsAdd.php
app/Console/Commands/RetargetinglistsDelete.php
app/Console/Commands/RetargetinglistsUpdate.php
app/Console/Commands/SitelinksAdd.php
app/Console/Commands/VCardsAdd.php
app/Console/Commands/VCardsDelete.php
app/Service/Requests/Direct/GetRetargetinglists.php
app/Console/Commands/AdExtensionsAdd.php
View file @
96a0c59
...
@@ -57,7 +57,7 @@ class AdExtensionsAdd extends Command
...
@@ -57,7 +57,7 @@ class AdExtensionsAdd extends Command
$goalAdExtensions
=
$token
->
goalAdExtensionsForNotExternalForNotReserveCreate
;
$goalAdExtensions
=
$token
->
goalAdExtensionsForNotExternalForNotReserveCreate
;
foreach
(
array_chunk
(
$goalAdExtensions
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalAdExtensions
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalAdExtension
::
whereIn
(
'id'
,
$items
)
GoalAdExtension
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_create_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/AdGroupsAdd.php
View file @
96a0c59
...
@@ -63,7 +63,7 @@ class AdGroupsAdd extends Command
...
@@ -63,7 +63,7 @@ class AdGroupsAdd extends Command
$goalAdGroups
=
$token
->
dictionaryCampaignsEnabledForExternalSynchronized
->
pluck
(
'groupsForNotExternalForNotReserveCreate'
)
$goalAdGroups
=
$token
->
dictionaryCampaignsEnabledForExternalSynchronized
->
pluck
(
'groupsForNotExternalForNotReserveCreate'
)
->
collapse
();
->
collapse
();
foreach
(
array_chunk
(
$goalAdGroups
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalAdGroups
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalAdGroup
::
whereIn
(
'id'
,
$items
)
GoalAdGroup
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_create_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/AdGroupsDelete.php
View file @
96a0c59
...
@@ -80,7 +80,7 @@ class AdGroupsDelete extends Command
...
@@ -80,7 +80,7 @@ class AdGroupsDelete extends Command
continue
;
continue
;
}
}
foreach
(
array_chunk
(
$ids
,
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$ids
,
100
)
as
$items
)
{
GoalAdGroup
::
whereIn
(
'external_id'
,
$items
)
GoalAdGroup
::
whereIn
(
'external_id'
,
$items
)
->
update
([
->
update
([
'reserve_delete_at'
=>
Carbon
::
now
(),
'reserve_delete_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/AdGroupsLoadKeywords.php
View file @
96a0c59
...
@@ -60,7 +60,7 @@ class AdGroupsLoadKeywords extends Command
...
@@ -60,7 +60,7 @@ class AdGroupsLoadKeywords extends Command
->
pluck
(
'external_id'
)
->
pluck
(
'external_id'
)
->
toArray
();
->
toArray
();
foreach
(
array_chunk
(
$ad_group_ids
,
100
0
)
as
$ids_limit
)
{
foreach
(
array_chunk
(
$ad_group_ids
,
100
)
as
$ids_limit
)
{
$request
=
new
GetKeywords
();
$request
=
new
GetKeywords
();
$request
->
setToken
(
$token
)
$request
->
setToken
(
$token
)
->
call
([
->
call
([
...
...
app/Console/Commands/AdGroupsUpdate.php
View file @
96a0c59
...
@@ -59,7 +59,7 @@ class AdGroupsUpdate extends Command
...
@@ -59,7 +59,7 @@ class AdGroupsUpdate extends Command
$goalAdGroups
=
$token
->
dictionaryCampaignsEnabledForExternalUpdated
->
pluck
(
'groupsForExternalForNeedUpdatedForNotReserveUpdate'
)
$goalAdGroups
=
$token
->
dictionaryCampaignsEnabledForExternalUpdated
->
pluck
(
'groupsForExternalForNeedUpdatedForNotReserveUpdate'
)
->
collapse
();
->
collapse
();
foreach
(
array_chunk
(
$goalAdGroups
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
){
foreach
(
array_chunk
(
$goalAdGroups
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
){
GoalAdGroup
::
whereIn
(
'id'
,
$items
)
GoalAdGroup
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_update_at'
=>
Carbon
::
now
(),
'reserve_update_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/AdImagesAdd.php
View file @
96a0c59
...
@@ -57,7 +57,7 @@ class AdImagesAdd extends Command
...
@@ -57,7 +57,7 @@ class AdImagesAdd extends Command
$goalAdImages
=
$token
->
goalAdImagesForNotExternalForNotReserveCreate
;
$goalAdImages
=
$token
->
goalAdImagesForNotExternalForNotReserveCreate
;
foreach
(
array_chunk
(
$goalAdImages
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalAdImages
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalAdImage
::
whereIn
(
'id'
,
$items
)
GoalAdImage
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_create_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/AdvertisementsAdd.php
View file @
96a0c59
...
@@ -113,7 +113,7 @@ class AdvertisementsAdd extends Command
...
@@ -113,7 +113,7 @@ class AdvertisementsAdd extends Command
continue
;
continue
;
}
}
foreach
(
array_chunk
(
$goalAds
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalAds
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalAdvertisement
::
whereIn
(
'id'
,
$items
)
GoalAdvertisement
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_create_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/AdvertisementsArchive.php
View file @
96a0c59
...
@@ -66,7 +66,7 @@ class AdvertisementsArchive extends Command
...
@@ -66,7 +66,7 @@ class AdvertisementsArchive extends Command
return
;
return
;
}
}
foreach
(
array_chunk
(
$ads
->
pluck
(
'external_id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$ads
->
pluck
(
'external_id'
)
->
toArray
(),
100
)
as
$items
)
{
if
(
$token
->
isMain
())
{
if
(
$token
->
isMain
())
{
Advertisement
::
whereIn
(
'external_id'
,
$items
)
Advertisement
::
whereIn
(
'external_id'
,
$items
)
->
update
([
->
update
([
...
...
app/Console/Commands/AdvertisementsDelete.php
View file @
96a0c59
...
@@ -62,7 +62,7 @@ class AdvertisementsDelete extends Command
...
@@ -62,7 +62,7 @@ class AdvertisementsDelete extends Command
$ids
=
$ads
->
pluck
(
'external_id'
)
->
toArray
();
$ids
=
$ads
->
pluck
(
'external_id'
)
->
toArray
();
foreach
(
array_chunk
(
$ids
,
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$ids
,
100
)
as
$items
)
{
if
(
$token
->
isMain
())
{
if
(
$token
->
isMain
())
{
Advertisement
::
whereIn
(
'external_id'
,
$items
)
Advertisement
::
whereIn
(
'external_id'
,
$items
)
->
update
([
->
update
([
...
...
app/Console/Commands/AdvertisementsUpdate.php
View file @
96a0c59
...
@@ -111,7 +111,7 @@ class AdvertisementsUpdate extends Command
...
@@ -111,7 +111,7 @@ class AdvertisementsUpdate extends Command
continue
;
continue
;
}
}
foreach
(
array_chunk
(
$goalAds
->
pluck
(
'external_id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalAds
->
pluck
(
'external_id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalAdvertisement
::
whereIn
(
'external_id'
,
$items
)
GoalAdvertisement
::
whereIn
(
'external_id'
,
$items
)
->
update
([
->
update
([
'reserve_update_at'
=>
Carbon
::
now
(),
'reserve_update_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/AudienceTargetsAdd.php
View file @
96a0c59
...
@@ -58,7 +58,7 @@ class AudienceTargetsAdd extends Command
...
@@ -58,7 +58,7 @@ class AudienceTargetsAdd extends Command
$goalAudienceTargets
=
$token
->
dictionaryCampaignsEnabledForExternalSynchronized
->
pluck
(
'goalAudienceTargetsForNotExternalForNotReserveCreate'
)
$goalAudienceTargets
=
$token
->
dictionaryCampaignsEnabledForExternalSynchronized
->
pluck
(
'goalAudienceTargetsForNotExternalForNotReserveCreate'
)
->
collapse
();
->
collapse
();
foreach
(
array_chunk
(
$goalAudienceTargets
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalAudienceTargets
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalAudienceTarget
::
whereIn
(
'id'
,
$items
)
GoalAudienceTarget
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_create_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/AudienceTargetsDelete.php
View file @
96a0c59
...
@@ -58,7 +58,7 @@ class AudienceTargetsDelete extends Command
...
@@ -58,7 +58,7 @@ class AudienceTargetsDelete extends Command
$ids
=
$goalAudienceTargets
->
pluck
(
'external_id'
)
->
toArray
();
$ids
=
$goalAudienceTargets
->
pluck
(
'external_id'
)
->
toArray
();
foreach
(
array_chunk
(
$ids
,
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$ids
,
100
)
as
$items
)
{
GoalAudienceTarget
::
whereIn
(
'external_id'
,
$items
)
GoalAudienceTarget
::
whereIn
(
'external_id'
,
$items
)
->
update
([
->
update
([
'reserve_delete_at'
=>
Carbon
::
now
(),
'reserve_delete_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/BidModifiersAdd.php
View file @
96a0c59
...
@@ -151,7 +151,7 @@ class BidModifiersAdd extends Command
...
@@ -151,7 +151,7 @@ class BidModifiersAdd extends Command
foreach
(
array_chunk
(
$goalBidModifiers
->
pluck
(
'ids'
)
->
map
(
function
(
$ids
)
{
foreach
(
array_chunk
(
$goalBidModifiers
->
pluck
(
'ids'
)
->
map
(
function
(
$ids
)
{
return
json_decode
(
$ids
);
return
json_decode
(
$ids
);
})
->
collapse
()
->
toArray
(),
100
0
)
as
$items
)
{
})
->
collapse
()
->
toArray
(),
100
)
as
$items
)
{
GoalBidModifier
::
whereIn
(
'id'
,
$items
)
GoalBidModifier
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_create_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/BidModifiersUpdate.php
View file @
96a0c59
...
@@ -70,7 +70,7 @@ class BidModifiersUpdate extends Command
...
@@ -70,7 +70,7 @@ class BidModifiersUpdate extends Command
continue
;
continue
;
}
}
foreach
(
array_chunk
(
$goalBidModifiers
->
pluck
(
'external_id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalBidModifiers
->
pluck
(
'external_id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalBidModifier
::
whereIn
(
'external_id'
,
$items
)
GoalBidModifier
::
whereIn
(
'external_id'
,
$items
)
->
update
([
->
update
([
'reserve_update_at'
=>
Carbon
::
now
(),
'reserve_update_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/CampaignsAdd.php
View file @
96a0c59
...
@@ -48,7 +48,7 @@ class CampaignsAdd extends Command
...
@@ -48,7 +48,7 @@ class CampaignsAdd extends Command
foreach
(
$tokens
as
$token
)
{
foreach
(
$tokens
as
$token
)
{
foreach
(
array_chunk
(
$token
->
dictionaryCampaignsEnabledForNotExternalForNotReserveCreate
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$token
->
dictionaryCampaignsEnabledForNotExternalForNotReserveCreate
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
DictionaryCampaign
::
whereIn
(
'id'
,
$items
)
DictionaryCampaign
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_create_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/CampaignsResume.php
View file @
96a0c59
...
@@ -63,7 +63,7 @@ class CampaignsResume extends Command
...
@@ -63,7 +63,7 @@ class CampaignsResume extends Command
->
get
();
->
get
();
foreach
(
$tokens
as
$token
)
{
foreach
(
$tokens
as
$token
)
{
foreach
(
array_chunk
(
$token
->
dictionaryCampaignsEnabledForExternalDisabledForNotReserveResume
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$token
->
dictionaryCampaignsEnabledForExternalDisabledForNotReserveResume
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
DictionaryCampaign
::
whereIn
(
'id'
,
$items
)
DictionaryCampaign
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_resume_at'
=>
Carbon
::
now
(),
'reserve_resume_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/CampaignsSuspend.php
View file @
96a0c59
...
@@ -61,7 +61,7 @@ class CampaignsSuspend extends Command
...
@@ -61,7 +61,7 @@ class CampaignsSuspend extends Command
->
get
();
->
get
();
foreach
(
$tokens
as
$token
)
{
foreach
(
$tokens
as
$token
)
{
foreach
(
array_chunk
(
$token
->
dictionaryCampaignsNotEnabledForExternalNotDisabledForNotReserveSuspend
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$token
->
dictionaryCampaignsNotEnabledForExternalNotDisabledForNotReserveSuspend
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
DictionaryCampaign
::
whereIn
(
'id'
,
$items
)
DictionaryCampaign
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_suspend_at'
=>
Carbon
::
now
(),
'reserve_suspend_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/CampaignsUpdate.php
View file @
96a0c59
...
@@ -47,7 +47,7 @@ class CampaignsUpdate extends Command
...
@@ -47,7 +47,7 @@ class CampaignsUpdate extends Command
->
get
();
->
get
();
foreach
(
$tokens
as
$token
)
{
foreach
(
$tokens
as
$token
)
{
foreach
(
array_chunk
(
$token
->
dictionaryCampaignsEnabledForExternalUpdatedNeedUpdatedForNotReserveUpdate
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$token
->
dictionaryCampaignsEnabledForExternalUpdatedNeedUpdatedForNotReserveUpdate
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
DictionaryCampaign
::
whereIn
(
'id'
,
$items
)
DictionaryCampaign
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_update_at'
=>
Carbon
::
now
(),
'reserve_update_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/KeywordsAdd.php
View file @
96a0c59
...
@@ -77,7 +77,7 @@ class KeywordsAdd extends Command
...
@@ -77,7 +77,7 @@ class KeywordsAdd extends Command
if
(
$goalKeywords
->
count
())
{
if
(
$goalKeywords
->
count
())
{
foreach
(
array_chunk
(
$goalKeywords
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalKeywords
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalKeyword
::
whereIn
(
'id'
,
$items
)
GoalKeyword
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_create_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/KeywordsDelete.php
View file @
96a0c59
...
@@ -77,7 +77,7 @@ class KeywordsDelete extends Command
...
@@ -77,7 +77,7 @@ class KeywordsDelete extends Command
continue
;
continue
;
}
}
foreach
(
array_chunk
(
$ids
,
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$ids
,
100
)
as
$items
)
{
GoalKeyword
::
whereIn
(
'external_id'
,
$items
)
GoalKeyword
::
whereIn
(
'external_id'
,
$items
)
->
update
([
->
update
([
'reserve_delete_at'
=>
Carbon
::
now
(),
'reserve_delete_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/KeywordsUpdate.php
View file @
96a0c59
...
@@ -59,7 +59,7 @@ class KeywordsUpdate extends Command
...
@@ -59,7 +59,7 @@ class KeywordsUpdate extends Command
continue
;
continue
;
}
}
foreach
(
array_chunk
(
$goalKeywords
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalKeywords
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalKeyword
::
whereIn
(
'id'
,
$items
)
GoalKeyword
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_update_at'
=>
Carbon
::
now
(),
'reserve_update_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/NegativeKeywordSharedSetsAdd.php
View file @
96a0c59
...
@@ -57,7 +57,7 @@ class NegativeKeywordSharedSetsAdd extends Command
...
@@ -57,7 +57,7 @@ class NegativeKeywordSharedSetsAdd extends Command
$goalNegativeKeywordSharedSets
=
$token
->
goalNegativeKeywordSharedSetsForNotExternalForNotReserveCreate
;
$goalNegativeKeywordSharedSets
=
$token
->
goalNegativeKeywordSharedSetsForNotExternalForNotReserveCreate
;
foreach
(
array_chunk
(
$goalNegativeKeywordSharedSets
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalNegativeKeywordSharedSets
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalNegativeKeywordSharedSet
::
whereIn
(
'id'
,
$items
)
GoalNegativeKeywordSharedSet
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_create_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/NegativeKeywordSharedSetsUpdate.php
View file @
96a0c59
...
@@ -58,7 +58,7 @@ class NegativeKeywordSharedSetsUpdate extends Command
...
@@ -58,7 +58,7 @@ class NegativeKeywordSharedSetsUpdate extends Command
$goalNegativeKeywordSharedSets
=
$token
->
goalNegativeKeywordSharedSetsForExternalForNotReserveUpdateNeedUpdated
;
$goalNegativeKeywordSharedSets
=
$token
->
goalNegativeKeywordSharedSetsForExternalForNotReserveUpdateNeedUpdated
;
foreach
(
array_chunk
(
$goalNegativeKeywordSharedSets
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalNegativeKeywordSharedSets
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalNegativeKeywordSharedSet
::
whereIn
(
'id'
,
$items
)
GoalNegativeKeywordSharedSet
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_update_at'
=>
Carbon
::
now
(),
'reserve_update_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/RetargetinglistsAdd.php
View file @
96a0c59
...
@@ -57,7 +57,7 @@ class RetargetinglistsAdd extends Command
...
@@ -57,7 +57,7 @@ class RetargetinglistsAdd extends Command
$goalRetargetinglists
=
$token
->
goalRetargetinglistsForNotExternalForNotReserveCreate
;
$goalRetargetinglists
=
$token
->
goalRetargetinglistsForNotExternalForNotReserveCreate
;
foreach
(
array_chunk
(
$goalRetargetinglists
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalRetargetinglists
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalRetargetinglist
::
whereIn
(
'id'
,
$items
)
GoalRetargetinglist
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_create_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/RetargetinglistsDelete.php
View file @
96a0c59
...
@@ -54,7 +54,7 @@ class RetargetinglistsDelete extends Command
...
@@ -54,7 +54,7 @@ class RetargetinglistsDelete extends Command
$goalRetargetinglists
=
$token
->
goalRetargetinglistsForExternalNeedDeletedForNotReserveDelete
;
$goalRetargetinglists
=
$token
->
goalRetargetinglistsForExternalNeedDeletedForNotReserveDelete
;
foreach
(
array_chunk
(
$goalRetargetinglists
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalRetargetinglists
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalRetargetinglist
::
whereIn
(
'id'
,
$items
)
GoalRetargetinglist
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_delete_at'
=>
Carbon
::
now
(),
'reserve_delete_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/RetargetinglistsUpdate.php
View file @
96a0c59
...
@@ -57,7 +57,7 @@ class RetargetinglistsUpdate extends Command
...
@@ -57,7 +57,7 @@ class RetargetinglistsUpdate extends Command
$goalRetargetinglists
=
$token
->
goalRetargetinglistsForExternalForNotReserveUpdateNeedUpdated
;
$goalRetargetinglists
=
$token
->
goalRetargetinglistsForExternalForNotReserveUpdateNeedUpdated
;
foreach
(
array_chunk
(
$goalRetargetinglists
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalRetargetinglists
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalRetargetinglist
::
whereIn
(
'id'
,
$items
)
GoalRetargetinglist
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_update_at'
=>
Carbon
::
now
(),
'reserve_update_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/SitelinksAdd.php
View file @
96a0c59
...
@@ -58,7 +58,7 @@ class SitelinksAdd extends Command
...
@@ -58,7 +58,7 @@ class SitelinksAdd extends Command
$goalSitelinks
=
$token
->
goalSitelinksForNotExternalForNotReserveCreate
;
$goalSitelinks
=
$token
->
goalSitelinksForNotExternalForNotReserveCreate
;
// foreach (array_chunk($goalSitelinks->pluck('id')->toArray(), 100
0
) as $items) {
// foreach (array_chunk($goalSitelinks->pluck('id')->toArray(), 100) as $items) {
// GoalSitelink::whereIn('id', $items)
// GoalSitelink::whereIn('id', $items)
// ->update([
// ->update([
// 'reserve_create_at' => Carbon::now(),
// 'reserve_create_at' => Carbon::now(),
...
...
app/Console/Commands/VCardsAdd.php
View file @
96a0c59
...
@@ -58,7 +58,7 @@ class VCardsAdd extends Command
...
@@ -58,7 +58,7 @@ class VCardsAdd extends Command
$goalVCards
=
$token
->
dictionaryCampaignsEnabledForExternalSynchronized
->
pluck
(
'goalVCardsForNotExternalForNotReserveCreate'
)
$goalVCards
=
$token
->
dictionaryCampaignsEnabledForExternalSynchronized
->
pluck
(
'goalVCardsForNotExternalForNotReserveCreate'
)
->
collapse
();
->
collapse
();
foreach
(
array_chunk
(
$goalVCards
->
pluck
(
'id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$goalVCards
->
pluck
(
'id'
)
->
toArray
(),
100
)
as
$items
)
{
GoalVCard
::
whereIn
(
'id'
,
$items
)
GoalVCard
::
whereIn
(
'id'
,
$items
)
->
update
([
->
update
([
'reserve_create_at'
=>
Carbon
::
now
(),
'reserve_create_at'
=>
Carbon
::
now
(),
...
...
app/Console/Commands/VCardsDelete.php
View file @
96a0c59
...
@@ -65,7 +65,7 @@ class VCardsDelete extends Command
...
@@ -65,7 +65,7 @@ class VCardsDelete extends Command
return
;
return
;
}
}
foreach
(
array_chunk
(
$vCards
->
pluck
(
'external_id'
)
->
toArray
(),
100
0
)
as
$items
)
{
foreach
(
array_chunk
(
$vCards
->
pluck
(
'external_id'
)
->
toArray
(),
100
)
as
$items
)
{
if
(
$token
->
isMain
())
{
if
(
$token
->
isMain
())
{
VCard
::
whereIn
(
'external_id'
,
$items
)
VCard
::
whereIn
(
'external_id'
,
$items
)
->
update
([
->
update
([
...
...
app/Service/Requests/Direct/GetRetargetinglists.php
View file @
96a0c59
...
@@ -7,6 +7,7 @@ use App\Models\Retargetinglist;
...
@@ -7,6 +7,7 @@ use App\Models\Retargetinglist;
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
;
use
Illuminate\Support\Facades\DB
;
class
GetRetargetinglists
extends
DirectRequest
class
GetRetargetinglists
extends
DirectRequest
{
{
...
...
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