popup time order by bookmaker name
This commit is contained in:
1 parent
5a44fc18b3
commit
79271f22e1
2 files changed
+30
-29
No files matched your search
@@ -317,16 +317,14 @@ class Odds
|
||||
case 0:
|
||||
foreach ($offer->odds->attributes() as $attributeName => $attributeValue) {
|
||||
switch ($attributeName) {
|
||||
|
||||
case 'starting_time':
|
||||
$res = EventBookmaker::where('event_id', $event_id)->where('bookmaker_id', $bookmaker_id)->first();
|
||||
if ($res && $res->starttime != $attributeValue) {
|
||||
$res->starttime = $attributeValue;
|
||||
DB::transaction(function () use ($res) {
|
||||
$res->save();
|
||||
}, 5);
|
||||
|
||||
}
|
||||
DB::transaction(function () use ($odds, $sport_id, $event_id, $bookmaker_id, $attributeValue) {
|
||||
EventBookmaker::updateOrCreate([
|
||||
'event_id' => $event_id,
|
||||
'sport_id' => $sport_id,
|
||||
'bookmaker_id' => $bookmaker_id,
|
||||
], ['in_feed' => 1, 'bmoid' => $odds['bmoid'], 'starttime' => $attributeValue]);
|
||||
}, 5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -337,14 +335,13 @@ class Odds
|
||||
foreach ($offer->odds->attributes() as $attributeName => $attributeValue) {
|
||||
switch ($attributeName) {
|
||||
case 'starting_time':
|
||||
|
||||
$res = EventBookmaker::where('event_id', $event_id)->where('bookmaker_id', $bookmaker_id)->first();
|
||||
if ($res && $res->starttime != $attributeValue) {
|
||||
$res->starttime = $attributeValue;
|
||||
DB::transaction(function () use ($res) {
|
||||
$res->save();
|
||||
}, 5);
|
||||
}
|
||||
DB::transaction(function () use ($odds, $sport_id, $event_id, $bookmaker_id, $attributeValue) {
|
||||
EventBookmaker::updateOrCreate([
|
||||
'event_id' => $event_id,
|
||||
'sport_id' => $sport_id,
|
||||
'bookmaker_id' => $bookmaker_id,
|
||||
], ['in_feed' => 1, 'bmoid' => $odds['bmoid'], 'starttime' => $attributeValue]);
|
||||
}, 5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -356,14 +353,13 @@ class Odds
|
||||
foreach ($offer->odds->attributes() as $attributeName => $attributeValue) {
|
||||
switch ($attributeName) {
|
||||
case 'starting_time':
|
||||
|
||||
$res = EventBookmaker::where('event_id', $event_id)->where('bookmaker_id', $bookmaker_id)->first();
|
||||
if ($res && $res->starttime != $attributeValue) {
|
||||
$res->starttime = $attributeValue;
|
||||
DB::transaction(function () use ($res) {
|
||||
$res->save();
|
||||
}, 5);
|
||||
}
|
||||
DB::transaction(function () use ($odds, $sport_id, $event_id, $bookmaker_id, $attributeValue) {
|
||||
EventBookmaker::updateOrCreate([
|
||||
'event_id' => $event_id,
|
||||
'sport_id' => $sport_id,
|
||||
'bookmaker_id' => $bookmaker_id,
|
||||
], ['in_feed' => 1, 'bmoid' => $odds['bmoid'], 'starttime' => $attributeValue]);
|
||||
}, 5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user