|
|
|
|
@ -141,7 +141,7 @@ class OtherController extends CommonController
|
|
|
|
|
$sortType = $all['sort_type'] ?? 'asc';
|
|
|
|
|
|
|
|
|
|
// 构建基础查询
|
|
|
|
|
$query = Company::select('id','company_name','company_longitude','company_latitude','company_address')
|
|
|
|
|
$query = Company::select('id', 'company_name', 'company_longitude', 'company_latitude', 'company_address')
|
|
|
|
|
->where(function ($query) use ($all) {
|
|
|
|
|
if (isset($all['company_name'])) {
|
|
|
|
|
$query->where('company_name', 'like', '%' . $all['company_name'] . '%');
|
|
|
|
|
@ -156,9 +156,9 @@ class OtherController extends CommonController
|
|
|
|
|
$query->where('is_schoolmate', 1);
|
|
|
|
|
})->with([
|
|
|
|
|
'users' => function ($query) {
|
|
|
|
|
$query->where('is_schoolmate', 1)->with([
|
|
|
|
|
$query->select('id', 'name', 'company_position')->where('is_schoolmate', 1)->with([
|
|
|
|
|
'courseSigns' => function ($query) {
|
|
|
|
|
$query->with('course')->orderBy('fee_status', 'desc');
|
|
|
|
|
$query->select('id', 'year')->with('course')->orderBy('fee_status', 'desc');
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|