alarm wip
This commit is contained in:
1 parent
d81af0b02b
commit
04b17abd30
15 files changed
+302
-61
No files matched your search
@@ -12,6 +12,7 @@ use App\Console\Commands\Services\Tasks\Alarm\AlarmSettings;
|
||||
use App\Console\Commands\Services\Tasks\Alarm\AlarmStore;
|
||||
use App\Models\Client;
|
||||
use App\Models\EventBookmaker;
|
||||
use App\Models\OddsTable;
|
||||
use App\Models\Sport;
|
||||
use App\Utilities\Notice;
|
||||
|
||||
@@ -26,6 +27,8 @@ class GenerateAlarms
|
||||
Notice::note('GENERATE ALARMS', 'b');
|
||||
}
|
||||
|
||||
$oddnames = OddsTable::oddnames();
|
||||
|
||||
$clients = Client::get();
|
||||
|
||||
$sports = Sport::where('is_active', 1)->pluck('id');
|
||||
@@ -44,17 +47,21 @@ class GenerateAlarms
|
||||
|
||||
$res = EventBookmaker::where('bookmaker_id', $client_bookmaker_id)->where('sport_id', $sport_id)->get();
|
||||
|
||||
// $res = EventBookmaker::where('event_id', 14597944)->where('bookmaker_id', $client_bookmaker_id)->where('sport_id', $sport_id)->get();
|
||||
|
||||
foreach ($res as $event) {
|
||||
|
||||
foreach ($multilines as $multiline_id => $multiline) {
|
||||
|
||||
$odds = AlarmLoadOdds::get($event->event_id, $multiline['table'], $multiline['oddnames']);
|
||||
$table = $multiline['table'];
|
||||
|
||||
$odds = AlarmLoadOdds::get($event->event_id, $table, $oddnames[$table]);
|
||||
|
||||
$compare_odds = AlarmFilterCompare::get($odds, $filter);
|
||||
|
||||
$client_odds = AlarmFilterClient::get($odds, $client_bookmaker_id);
|
||||
|
||||
AlarmStore::get($event->event_id, $multiline['table'], $client_bookmaker_id, $alarm_threshold[$multiline_id], $compare_odds, $client_odds);
|
||||
AlarmStore::get($event->event_id, $oddnames[$table], $client_bookmaker_id, $alarm_threshold[$multiline_id], $compare_odds, $client_odds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user