master
cody 3 months ago
parent 74a146059e
commit 09c0a6ae40

@ -299,7 +299,10 @@ class CompanyController extends BaseController
}
// 当前周期被投企业数(与 courses-home 的 course_signs_invested_current 口径一致)
$yearInvestedCompanies = CourseSign::yhInvestedTotal($start_date, $end_date, $course_ids, true);
// 当 start_year、end_year 均为空时,不按课程日期过滤,与 courses-home 的 start_date=、end_date= 全周期一致
$yearStart = (empty($start_year) && empty($end_year)) ? null : $start_date;
$yearEnd = (empty($start_year) && empty($end_year)) ? null : $end_date;
$yearInvestedCompanies = CourseSign::yhInvestedTotal($yearStart, $yearEnd, $course_ids, true);
if ($yearInvestedCompanies) {
$yearInvestedCompaniesCollection = collect($yearInvestedCompanies);
$statistics['company_invested_year_total'] = $yearInvestedCompaniesCollection->count();

@ -173,7 +173,7 @@ class CourseSign extends SoftDeletesModel
}
/**
* 累计被投企业统计
* 投企业统计
* @param string|null $start_date 开始日期
* @param string|null $end_date 结束日期
* @param array|null $course_ids 课程ID仅在自定义时间时生效

Loading…
Cancel
Save