|
|
|
|
@ -185,7 +185,6 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
$companies = Company::whereHas('users', function ($query) use ($userIds) {
|
|
|
|
|
$query->whereIn('id', $userIds);
|
|
|
|
|
})->where('is_yh_invested', 1)->get();
|
|
|
|
|
dd($companies->count());
|
|
|
|
|
// 自定义时间:需要按被投时间筛选
|
|
|
|
|
$startDate = substr($start_date, 0, 10);
|
|
|
|
|
$endDate = substr($end_date, 0, 10);
|
|
|
|
|
@ -199,12 +198,12 @@ class CourseSign extends SoftDeletesModel
|
|
|
|
|
if ($investDate && $investDate >= $startDate && $investDate <= $endDate) {
|
|
|
|
|
$filteredCompanies[] = $company;
|
|
|
|
|
break; // 只要有一条满足就加入
|
|
|
|
|
}else{
|
|
|
|
|
dd($company);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$companies = collect($filteredCompanies);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 返回结果
|
|
|
|
|
if ($retList) {
|
|
|
|
|
return $companies->values();
|
|
|
|
|
|