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 e4d8e4a6
authored
Dec 01, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#21104 Перенос проекта в продакшн (Исправлена блокировка при обновлении переменных)
1 parent
5d3ba19e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
app/Console/Commands/AdvertisementsUpdate.php
app/Http/Controllers/CampaignVariablesController.php
app/Console/Commands/AdvertisementsUpdate.php
View file @
e4d8e4a
...
@@ -78,6 +78,7 @@ class AdvertisementsUpdate extends Command
...
@@ -78,6 +78,7 @@ class AdvertisementsUpdate extends Command
->
whereNotNull
(
'goal_advertisements.goal_sitelink_external_id'
);
->
whereNotNull
(
'goal_advertisements.goal_sitelink_external_id'
);
});
});
})
})
->
whereNotNull
(
'goal_advertisements.external_id'
)
->
whereNull
(
'advertisements.deleted_at'
)
->
whereNull
(
'advertisements.deleted_at'
)
->
whereNull
(
'goal_advertisements.reserve_update_at'
)
->
whereNull
(
'goal_advertisements.reserve_update_at'
)
->
whereNotNull
(
'goal_advertisements.updated_need'
)
->
whereNotNull
(
'goal_advertisements.updated_need'
)
...
...
app/Http/Controllers/CampaignVariablesController.php
View file @
e4d8e4a
...
@@ -196,28 +196,44 @@ class CampaignVariablesController extends Controller
...
@@ -196,28 +196,44 @@ class CampaignVariablesController extends Controller
}
}
if
(
$dictionary_campaign
->
external_id
)
{
if
(
$dictionary_campaign
->
external_id
)
{
$dictionary_campaign
->
update
([
$dictionary_campaign
->
where
(
function
(
$query
)
{
$query
->
getModel
()
->
timestamps
=
false
;
})
->
update
([
'updated_need'
=>
Carbon
::
now
(),
'updated_need'
=>
Carbon
::
now
(),
]);
]);
$dictionary_campaign
->
groups
()
->
forExternal
()
->
update
([
$dictionary_campaign
->
groups
()
->
forExternal
()
->
where
(
function
(
$query
)
{
$query
->
getModel
()
->
timestamps
=
false
;
})
->
update
([
'updated_need'
=>
Carbon
::
now
(),
'updated_need'
=>
Carbon
::
now
(),
]);
]);
$dictionary_campaign
->
goalAdvertisements
()
->
forExternal
()
->
update
([
$dictionary_campaign
->
goalAdvertisements
()
->
forExternal
()
->
where
(
function
(
$query
)
{
$query
->
getModel
()
->
timestamps
=
false
;
})
->
update
([
'updated_need'
=>
Carbon
::
now
(),
'updated_need'
=>
Carbon
::
now
(),
]);
]);
$dictionary_campaign
->
goalKeywords
()
->
forExternal
()
->
update
([
$dictionary_campaign
->
goalKeywords
()
->
forExternal
()
->
where
(
function
(
$query
)
{
$query
->
getModel
()
->
timestamps
=
false
;
})
->
update
([
'updated_need'
=>
Carbon
::
now
(),
'updated_need'
=>
Carbon
::
now
(),
]);
]);
// $dictionary_campaign->goalGoalSitelink()->forExternal()->update([
// $dictionary_campaign->goalGoalSitelink()->forExternal()->where(function ($query) {
// $query->getModel()->timestamps = false;
// })->update([
// 'updated_need' => Carbon::now(),
// 'updated_need' => Carbon::now(),
// ]);
// ]);
$dictionary_campaign
->
goalVCards
()
->
forExternal
()
->
update
([
$dictionary_campaign
->
goalVCards
()
->
forExternal
()
->
where
(
function
(
$query
)
{
$query
->
getModel
()
->
timestamps
=
false
;
})
->
update
([
'updated_need'
=>
Carbon
::
now
(),
'updated_need'
=>
Carbon
::
now
(),
]);
]);
GoalRetargetinglist
::
forExternal
()
->
update
([
GoalRetargetinglist
::
forExternal
()
->
where
(
function
(
$query
)
{
$query
->
getModel
()
->
timestamps
=
false
;
})
->
update
([
'updated_need'
=>
Carbon
::
now
(),
'updated_need'
=>
Carbon
::
now
(),
]);
]);
// NegativeKeywordSharedSet::forExternal()->update([
// NegativeKeywordSharedSet::forExternal()->where(function ($query) {
// $query->getModel()->timestamps = false;
// })->update([
// 'updated_need' => Carbon::now(),
// 'updated_need' => Carbon::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