This commit is contained in:
salam committed 2026-01-26 12:17:24 +01:00
1 parent 49b1eba348
commit 9ca5657827
28 files changed
+288 -234

No files matched your search

@@ -4,6 +4,7 @@ namespace App\Console\Commands\Grapper\Fixtures;
use App\Console\Commands\Nuh;
use App\Models\Event;
use App\Models\EventBookmaker;
use App\Models\Mapper;
use Illuminate\Support\Carbon;
@@ -50,19 +51,23 @@ class FindFixture
break;
case 3:
// MAGLOO KENIA
$match = Event::where('magken_id', $event_id)->first();
$res = EventBookmaker::where('bookmaker_id', 10)->where('event_id', $event_id)->first();
$match = Event::where('id', $res->event_id)->first();
break;
case 4:
// MAGLOO NIGERIA
$match = Event::where('magnig_id', $event_id)->first();
$res = EventBookmaker::where('bookmaker_id', 16)->where('event_id', $event_id)->first();
$match = Event::where('id', $res->event_id)->first();
break;
case 5:
// LOGIFUTUR NIGERA
$match = Event::where('lognig_id', $event_id)->first();
$res = EventBookmaker::where('bookmaker_id', 35)->where('event_id', $event_id)->first();
$match = Event::where('id', $res->event_id)->first();
break;
case 6:
// LOGIFUTUR COLOMBIA
$match = Event::where('logcol_id', $event_id)->first();
$res = EventBookmaker::where('bookmaker_id', 36)->where('event_id', $event_id)->first();
$match = Event::where('id', $res->event_id)->first();
break;
}
}
@@ -148,30 +153,6 @@ class FindFixture
$update_array['bet365_id'] = $bet365_id;
}
switch ($event['provider_id']) {
case 2:
// BETSAPI
$update_array['betsapi_id'] = $event_id;
break;
case 3:
// MAGLOO KENIA
$update_array['magken_id'] = $event_id;
break;
case 4:
// MAGLOO NIGERIA
$update_array['magnig_id'] = $event_id;
break;
case 5:
// LOGIFUTUR NIGERA
$update_array['lognig_id'] = $event_id;
break;
case 6:
// LOGIFUTUR COLOMBIA
$update_array['logcol_id'] = $event_id;
break;
default:
}
if ($update_array) {
Event::where('id', $match_id)->update($update_array);
}
+4 -4
View File
@@ -61,7 +61,7 @@ class Odds
$starttime = Carbon::parse($match['dt'])->toDateTimeString();
$event_id = Event::where('betradar_id', $betradar_id)->orWhere('magnig_id', $bmoid)->orWhere('magken_id', $bmoid)->value('id');
$event_id = Event::where('betradar_id', $betradar_id)->value('id');
if ($event_id) {
$base = [];
@@ -80,9 +80,9 @@ class Odds
'bookmaker_id' => Nuh::$options['bookmaker_id'],
], ['starttime' => $starttime, 'in_feed' => 1, 'bmoid' => $base['bmoid']]);
if ($event_id == 14190947) {
// dd($match['M']);
}
// if ($event_id == 14190947) {
// dd($match['M']);
// }
foreach ($match['M'] as $magloo_bettype_id => $value) {
switch ($magloo_bettype_id) {
@@ -23,37 +23,46 @@ class GenerateDefaultSetting
Notice::note('GENERATE DEFAULT SETTING', 'b');
}
if ($debug) {
Notice::note('1) multiline bookmaker slots for client', 'p');
}
/**************************************************
* MULTILINE SLOTS
**************************************************/
$sports = Sport::where('is_active', 1)->pluck('id');
if ($debug) {
Notice::note('1) MULTILINE SLOTS', 'p');
}
$bookmaker_slots = [1 => 6, 2 => 30, 3 => 649, 4 => 126];
$clients = Client::get()->pluck('id');
$clients = Client::get();
foreach ($clients as $client_id) {
foreach ($clients as $client) {
foreach ($sports as $sport_id) {
foreach ($client->sport as $sport_id) {
$multilines = MultilineSetting::where('sport_id', $sport_id)->get()->pluck('id');
foreach ($client->bookmaker as $client_bookmaker_id) {
foreach ($multilines as $multiline_id) {
$multilines = MultilineSetting::where('sport_id', $sport_id)->get()->pluck('id');
foreach ($bookmaker_slots as $slot => $bookmaker_id) {
foreach ($multilines as $multiline_id) {
MultilineClient::firstOrCreate(
['client_id' => $client_id, 'sport_id' => $sport_id, 'multiline_setting_id' => $multiline_id, 'position' => $slot],
['bookmaker_id' => $bookmaker_id, 'sort' => $slot, 'disabled' => 0]
);
foreach ($bookmaker_slots as $slot => $bookmaker_id) {
MultilineClient::firstOrCreate(
['client_bookmaker_id' => $client_bookmaker_id, 'sport_id' => $sport_id, 'multiline_setting_id' => $multiline_id, 'position' => $slot],
['bookmaker_id' => $bookmaker_id, 'sort' => $slot, 'disabled' => 0]
);
}
}
}
}
}
/**************************************************
* BETTYPES for USER in MONITOR
**************************************************/
if ($debug) {
Notice::note('2) generator bettypes im comparatore for users', 'p');
Notice::note('2) GENERATOR BETTYPES IM COMPARATORE FOR USERS', 'p');
}
$users = User::get();
@@ -73,8 +82,12 @@ class GenerateDefaultSetting
}
}
/**************************************************
* COMPARING BOOKMAKER
**************************************************/
if ($debug) {
Notice::note('3) comparing bookmaker', 'p');
Notice::note('3) COMPARING BOOKMAKER', 'p');
}
$res = Client::get();