master
cody 2 weeks ago
parent 8829c1b069
commit 16b5972407

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

Loading…
Cancel
Save