master
cody 2 weeks ago
parent e4ab219339
commit c671990067

@ -310,7 +310,13 @@ class OtherController extends CommonController
// 开始结束日期的筛选。or查询 // 开始结束日期的筛选。or查询
$query->whereBetween('start_time', [$start_date, $end_date]) $query->whereBetween('start_time', [$start_date, $end_date])
->orWhereBetween('end_time', [$start_date, $end_date]); ->orWhereBetween('end_time', [$start_date, $end_date]);
})->where('type', $course_type_id)->get(); })->where(function ($query) {
$course_type_id = request('course_type_id', '');
$course_type_id = explode(',', $course_type_id);
if ($course_type_id) {
$query->whereIn('type', $course_type_id);
}
})->get();
foreach ($historyCourses as $historyCourse) { foreach ($historyCourses as $historyCourse) {
$courseTypesSum[] = [ $courseTypesSum[] = [
'course_type' => $historyCourse->typeDetail->name, 'course_type' => $historyCourse->typeDetail->name,

Loading…
Cancel
Save