wip
This commit is contained in:
1 parent
7c19b9d3ee
commit
9954f47139
2 files changed
+11
No files matched your search
+5
@@ -90,6 +90,11 @@ class StatistikoEventsTable
|
||||
if (!$data['sport_id']) {
|
||||
$data['sport_id'] = 1;
|
||||
}
|
||||
StatistikoEvent::where('exp_home', 0)->delete();
|
||||
StatistikoEvent::where('exp_away', 0)->delete();
|
||||
StatistikoEvent::where('exp_handicap', 0)->delete();
|
||||
StatistikoEvent::where('exp_total', 0)->delete();
|
||||
|
||||
$events = StatistikoEvent::where('sport_id', (int) $data['sport_id'])->pluck('match_id')->toArray();
|
||||
$doublEvents = array_diff_assoc(
|
||||
$events,
|
||||
|
||||
@@ -21,6 +21,11 @@ class ImportEvents
|
||||
foreach ($chunk as $row) {
|
||||
|
||||
$row = array_values($row);
|
||||
/**
|
||||
* must be != null
|
||||
* exp_home, exp_away, exp_handicap, exp_total
|
||||
*/
|
||||
if ((float) $row[21] != 0 && (float) $row[22] != 0 && (float) $row[23] != 0) {
|
||||
|
||||
StatistikoEvent::updateOrCreate(
|
||||
[
|
||||
@@ -57,6 +62,7 @@ class ImportEvents
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user