renewd grapper wip
This commit is contained in:
1 parent
8f1aeafe46
commit
4afe60a957
55 files changed
+1389
-823
No files matched your search
@@ -74,7 +74,7 @@ class Soccer
|
||||
$base['sport_id'] = $event['sport_id'];
|
||||
$base['provider_id'] = Nuh::$options['provider_id'];
|
||||
$base['bmoid'] = $event['event_id'];
|
||||
$base['flag'] = 1;
|
||||
$base['flags'] = 1;
|
||||
|
||||
// 1x2
|
||||
if (\count($_3way) == 3) {
|
||||
@@ -89,13 +89,12 @@ class Soccer
|
||||
Odds3way::create($_3way);
|
||||
} else {
|
||||
$res->h3w = number_format($_3way['h3w'], 2);
|
||||
$res->a3w = number_format($_3way['d3w'], 2);
|
||||
$res->d3w = number_format($_3way['a3w'], 2);
|
||||
$res->d3w = number_format($_3way['d3w'], 2);
|
||||
$res->a3w = number_format($_3way['a3w'], 2);
|
||||
if ($res->isDirty()) {
|
||||
$res->oddchange_at = now();
|
||||
}
|
||||
$res->checked_at = now();
|
||||
$res->flag = 1;
|
||||
$res->margin = $_3way['margin'];
|
||||
$res->save();
|
||||
}
|
||||
@@ -111,7 +110,7 @@ class Soccer
|
||||
|
||||
$res = OddsTotal::where('event_id', $event['id'])
|
||||
->where('bookmaker_id', $event['bookmaker_id'])
|
||||
->where('total', $event['total'])
|
||||
->where('total', $_total['total'])
|
||||
->first();
|
||||
|
||||
if (! $res) {
|
||||
@@ -179,12 +178,12 @@ class Soccer
|
||||
|
||||
$_tq['margin'] = (float) Margin::calculate($_tq, 1);
|
||||
|
||||
$_tq = array_merge($_dc, $base);
|
||||
$_tq = array_merge($_tq, $base);
|
||||
|
||||
$res = OddsTq::where('event_id', $event['id'])->where('bookmaker_id', $event['bookmaker_id'])->first();
|
||||
|
||||
if (! $res) {
|
||||
OddsTq::create($_dc);
|
||||
OddsTq::create($_tq);
|
||||
} else {
|
||||
$res->htq = number_format($_tq['htq'], 2);
|
||||
$res->atq = number_format($_tq['atq'], 2);
|
||||
|
||||
Reference in new issue
Block a user