master
cody 2 weeks ago
parent 8829c1b069
commit 16b5972407

@ -683,8 +683,12 @@ class OtherController extends CommonController
case 'course_total':
// 开课场次明细 - 与coursesHome算法一致
$calendars = Calendar::whereIn('course_id', $course_ids)
->whereBetween('date', [$start_date, $end_date])
$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);
}
})
->with('course')
->get();
@ -711,9 +715,12 @@ class OtherController extends CommonController
case 'course_day_total':
// 开课天数明细 - 与coursesHome算法一致
$calendars = Calendar::whereIn('course_id', $course_ids)
->whereBetween('date', [$start_date, $end_date])
->where('is_count_days', 1)
$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);
}
})->where('is_count_days', 1)
->with('course')
->get();

Loading…
Cancel
Save