alarm wip
This commit is contained in:
1 parent
d81af0b02b
commit
04b17abd30
15 files changed
+302
-61
No files matched your search
@@ -3,17 +3,11 @@
|
||||
namespace App\Console\Commands\Services\Tasks\Alarm;
|
||||
|
||||
use App\Models\EventBookmaker;
|
||||
use App\Models\OddsTable;
|
||||
|
||||
class AlarmStore
|
||||
{
|
||||
public static function get($event_id, $table, $client_bookmaker_id, $alarm_threshold, $compare_odds, $client_odds)
|
||||
public static function get($event_id, $oddnames, $client_bookmaker_id, $alarm_threshold, $compare_odds, $client_odds)
|
||||
{
|
||||
$res = OddsTable::where($table)->value('oddnames');
|
||||
$oddnames = explode(',', $res);
|
||||
|
||||
dd($oddnames);
|
||||
|
||||
if (! $compare_odds) {
|
||||
return;
|
||||
}
|
||||
@@ -22,21 +16,11 @@ class AlarmStore
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* get favorit
|
||||
*/
|
||||
$favorit = 100;
|
||||
foreach ($oddnames as $fieldname => $oddname) {
|
||||
if ($client_odds[$oddname] < $favorit) {
|
||||
$favorit = $oddname;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* evaluate
|
||||
*/
|
||||
$favorit = min($client_odds);
|
||||
|
||||
$update_array = [];
|
||||
foreach ($oddnames as $fieldname => $oddname) {
|
||||
if ($oddname == $favorit) {
|
||||
if ($client_odds[$oddname] == $favorit) {
|
||||
|
||||
$threshold = $client_odds[$oddname] - $compare_odds[$oddname];
|
||||
|
||||
|
||||
Reference in new issue
Block a user