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 e4cb12e3
authored
Jul 08, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
1 parent
4453a9d9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
7 deletions
app/Console/Commands/CampaignsFirstLoad.php
app/Console/Kernel.php
app/Service/Requests/Direct/AddVCards.php
app/Service/Requests/Direct/CheckChanges.php
app/Console/Commands/CampaignsFirstLoad.php
View file @
e4cb12e
...
@@ -50,9 +50,12 @@ class CampaignsFirstLoad extends Command
...
@@ -50,9 +50,12 @@ class CampaignsFirstLoad extends Command
->
call
();
->
call
();
Artisan
::
call
(
DictionariesLoad
::
class
);
Artisan
::
call
(
DictionariesLoad
::
class
);
Artisan
::
call
(
NegativeKeywordSharedSetsLoad
::
class
);
Artisan
::
call
(
CampaignsLoadGroups
::
class
);
Artisan
::
call
(
CampaignsLoadGroups
::
class
);
Artisan
::
call
(
AdGroupsLoadKeywords
::
class
);
Artisan
::
call
(
AdGroupsLoadKeywords
::
class
);
Artisan
::
call
(
AdExtensionsLoad
::
class
);
Artisan
::
call
(
AdExtensionsLoad
::
class
);
Artisan
::
call
(
VCardsLoad
::
class
);
Artisan
::
call
(
SitelinksLoad
::
class
);
Artisan
::
call
(
CampaignsLoadAds
::
class
);
Artisan
::
call
(
CampaignsLoadAds
::
class
);
Artisan
::
call
(
CampaignsLoadBidModifiers
::
class
);
Artisan
::
call
(
CampaignsLoadBidModifiers
::
class
);
...
...
app/Console/Kernel.php
View file @
e4cb12e
...
@@ -24,6 +24,8 @@ use App\Console\Commands\DictionaryCampaignsSyncByCampaign;
...
@@ -24,6 +24,8 @@ use App\Console\Commands\DictionaryCampaignsSyncByCampaign;
use
App\Console\Commands\KeywordsAdd
;
use
App\Console\Commands\KeywordsAdd
;
use
App\Console\Commands\KeywordsDelete
;
use
App\Console\Commands\KeywordsDelete
;
use
App\Console\Commands\KeywordsUpdate
;
use
App\Console\Commands\KeywordsUpdate
;
use
App\Console\Commands\NegativeKeywordSharedSetsAdd
;
use
App\Console\Commands\NegativeKeywordSharedSetsLoad
;
use
App\Console\Commands\RefreshLimits
;
use
App\Console\Commands\RefreshLimits
;
use
App\Console\Commands\SitelinksAdd
;
use
App\Console\Commands\SitelinksAdd
;
use
App\Console\Commands\SitelinksLoad
;
use
App\Console\Commands\SitelinksLoad
;
...
@@ -60,6 +62,9 @@ class Kernel extends ConsoleKernel
...
@@ -60,6 +62,9 @@ class Kernel extends ConsoleKernel
$schedule
->
command
(
CampaignsLoadUpdated
::
class
)
->
hourlyAt
(
10
);
$schedule
->
command
(
CampaignsLoadUpdated
::
class
)
->
hourlyAt
(
10
);
$schedule
->
command
(
CampaignsCheckUpdatedChildren
::
class
)
->
hourlyAt
(
10
);
$schedule
->
command
(
CampaignsCheckUpdatedChildren
::
class
)
->
hourlyAt
(
10
);
$schedule
->
command
(
NegativeKeywordSharedSetsLoad
::
class
)
->
hourlyAt
(
10
);
$schedule
->
command
(
NegativeKeywordSharedSetsAdd
::
class
)
->
hourlyAt
(
15
);
$schedule
->
command
(
CampaignsAdd
::
class
)
->
hourlyAt
(
15
);
$schedule
->
command
(
CampaignsAdd
::
class
)
->
hourlyAt
(
15
);
$schedule
->
command
(
CampaignsUpdate
::
class
)
->
hourlyAt
(
15
);
$schedule
->
command
(
CampaignsUpdate
::
class
)
->
hourlyAt
(
15
);
$schedule
->
command
(
CampaignsResume
::
class
)
->
hourlyAt
(
15
);
$schedule
->
command
(
CampaignsResume
::
class
)
->
hourlyAt
(
15
);
...
...
app/Service/Requests/Direct/AddVCards.php
View file @
e4cb12e
...
@@ -19,7 +19,7 @@ class AddVCards extends DirectRequest
...
@@ -19,7 +19,7 @@ class AddVCards extends DirectRequest
protected
$max_count
=
30
;
protected
$max_count
=
30
;
protected
$timestamp
;
protected
$timestamp
;
/* @var Collection|
NegativeKeywordSharedSet
[] */
/* @var Collection|
GoalVCard
[] */
protected
$goalVCards
;
protected
$goalVCards
;
public
function
call
(
$params
=
null
)
public
function
call
(
$params
=
null
)
...
@@ -80,10 +80,6 @@ class AddVCards extends DirectRequest
...
@@ -80,10 +80,6 @@ class AddVCards extends DirectRequest
'reserve_create_at'
=>
null
,
'reserve_create_at'
=>
null
,
]);
]);
$goalVCard
->
goalAdvertisement
()
->
update
([
''
]);
}
}
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
Log
::
debug
(
$e
);
Log
::
debug
(
$e
);
...
...
app/Service/Requests/Direct/CheckChanges.php
View file @
e4cb12e
...
@@ -8,6 +8,7 @@ use App\Models\Advertisement;
...
@@ -8,6 +8,7 @@ use App\Models\Advertisement;
use
App\Models\Campaigns
;
use
App\Models\Campaigns
;
use
App\Models\Pivots\DictionaryCampaign
;
use
App\Models\Pivots\DictionaryCampaign
;
use
App\Models\Pivots\GoalAdGroup
;
use
App\Models\Pivots\GoalAdGroup
;
use
App\Models\Pivots\GoalAdvertisement
;
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
;
...
@@ -99,7 +100,6 @@ class CheckChanges extends DirectRequest
...
@@ -99,7 +100,6 @@ class CheckChanges extends DirectRequest
'updated_need'
=>
Carbon
::
now
(),
'updated_need'
=>
Carbon
::
now
(),
]);
]);
}
}
}
}
}
}
...
@@ -124,7 +124,15 @@ class CheckChanges extends DirectRequest
...
@@ -124,7 +124,15 @@ class CheckChanges extends DirectRequest
]);
]);
}
}
}
else
{
}
else
{
//
/* Выставить флаг перезаписать целевое объявление
$goalAdvertisement = GoalAdvertisement::with('dictionaryCampaign')->firstWhere('external_id', $ad_id);
if ($goalAdvertisement && $goalAdvertisement->dictionaryCampaign && $goalAdvertisement->dictionaryCampaign->updated) {
$goalAdvertisement->update([
'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