|
|
|
|
@ -234,8 +234,10 @@ class OtherController extends CommonController
|
|
|
|
|
$query->whereBetween('start_time', [$start_date, $end_date])
|
|
|
|
|
->orWhereBetween('end_time', [$start_date, $end_date]);
|
|
|
|
|
})->where(function ($query) use ($courses) {
|
|
|
|
|
if (request('course_type_id')) {
|
|
|
|
|
$query->whereIn('course_type_id', request('course_type_id'));
|
|
|
|
|
$course_type_id = request('course_type_id', '');
|
|
|
|
|
$course_type_id = explode(',', $course_type_id);
|
|
|
|
|
if ($course_type_id) {
|
|
|
|
|
$query->whereIn('course_type_id', $course_type_id);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
$list['course_total'] = (clone $calendar)->count();
|
|
|
|
|
@ -699,11 +701,12 @@ class OtherController extends CommonController
|
|
|
|
|
// 开课场次明细 - 与coursesHome算法一致
|
|
|
|
|
$calendars = Calendar::whereBetween('date', [$start_date, $end_date])
|
|
|
|
|
->where(function ($query) use ($course_ids) {
|
|
|
|
|
if (request('course_type_id')) {
|
|
|
|
|
$query->whereIn('course_id', $course_ids);
|
|
|
|
|
$course_type_id = request('course_type_id', '');
|
|
|
|
|
$course_type_id = explode(',', $course_type_id);
|
|
|
|
|
if ($course_type_id) {
|
|
|
|
|
$query->whereIn('course_type_id', $course_type_id);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
->with('course')
|
|
|
|
|
})->with('course')
|
|
|
|
|
->get();
|
|
|
|
|
|
|
|
|
|
foreach ($calendars as $calendar) {
|
|
|
|
|
|