|
|
|
|
@ -331,7 +331,7 @@ class OtherController extends CommonController
|
|
|
|
|
'contact_phone' => $company->contact_phone ?? '',
|
|
|
|
|
'contact_mail' => $company->contact_mail ?? '',
|
|
|
|
|
'company_tag' => $company->company_tag ?? '',
|
|
|
|
|
'credit_code' => ' '.$company->credit_code ?? '',
|
|
|
|
|
'credit_code' => ' ' . $company->credit_code ?? '',
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$fields = [
|
|
|
|
|
@ -411,9 +411,11 @@ class OtherController extends CommonController
|
|
|
|
|
foreach ($users as $user) {
|
|
|
|
|
// 获取该学员报名的课程列表(与coursesHome逻辑保持一致)
|
|
|
|
|
$userCourseSigns = CourseSign::where('user_id', $user->id)
|
|
|
|
|
->whereDate('created_at', '>=', $start_date)
|
|
|
|
|
->whereDate('created_at', '<=', $end_date)
|
|
|
|
|
->where('status', 1)
|
|
|
|
|
->whereHas('course', function ($query) use ($start_date, $end_date) {
|
|
|
|
|
// 开始结束日期的筛选。or查询
|
|
|
|
|
$query->whereBetween('start_date', [$start_date, $end_date])
|
|
|
|
|
->whereBetween('end_date', [$start_date, $end_date]);
|
|
|
|
|
})->where('status', 1)
|
|
|
|
|
->where(function ($query) use ($course_ids) {
|
|
|
|
|
if ($course_ids->isNotEmpty()) {
|
|
|
|
|
$query->whereIn('course_id', $course_ids);
|
|
|
|
|
|