|
|
|
|
@ -161,7 +161,7 @@ class UserController extends BaseController
|
|
|
|
|
* @OA\Parameter(name="name", in="query", @OA\Schema(type="string"), required=false, description="名字"),
|
|
|
|
|
* @OA\Parameter(name="company_name", in="query", @OA\Schema(type="string"), required=false, description="公司名字"),
|
|
|
|
|
* @OA\Parameter(name="company_position", in="query", @OA\Schema(type="string"), required=false, description="职务"),
|
|
|
|
|
* @OA\Parameter(name="company_area", in="query", @OA\Schema(type="string"), required=false, description="所在区域,多个英文逗号分隔,匹配关联 company 的 company_area"),
|
|
|
|
|
* @OA\Parameter(name="company_area", in="query", @OA\Schema(type="string"), required=false, description="所在区域,多个英文逗号分隔,like 匹配关联 company 的 company_area(or 关系)"),
|
|
|
|
|
* @OA\Parameter(name="company_type", in="query", @OA\Schema(type="string"), required=false, description="企业性质"),
|
|
|
|
|
* @OA\Parameter(name="company_industry", in="query", @OA\Schema(type="string"), required=false, description="所属行业"),
|
|
|
|
|
* @OA\Parameter(name="courses_start_date", in="query", @OA\Schema(type="string"), required=false, description="课程开始时间"),
|
|
|
|
|
@ -366,12 +366,18 @@ class UserController extends BaseController
|
|
|
|
|
if (isset($all['company_position'])) {
|
|
|
|
|
$query->where('company_position', $all['company_position']);
|
|
|
|
|
}
|
|
|
|
|
// 所在区域:匹配关联 company 的 company_area
|
|
|
|
|
if (isset($all['company_area'])) {
|
|
|
|
|
$company_area = explode(',', $all['company_area']);
|
|
|
|
|
$query->whereHas('company', function ($c) use ($company_area) {
|
|
|
|
|
$c->whereIn('company_area', $company_area);
|
|
|
|
|
});
|
|
|
|
|
// 所在区域:like 匹配关联 company 的 company_area,多个英文逗号分隔为 or
|
|
|
|
|
if (isset($all['company_area']) && $all['company_area'] !== '') {
|
|
|
|
|
$company_area = array_filter(array_map('trim', explode(',', $all['company_area'])));
|
|
|
|
|
if (!empty($company_area)) {
|
|
|
|
|
$query->whereHas('company', function ($c) use ($company_area) {
|
|
|
|
|
$c->where(function ($q) use ($company_area) {
|
|
|
|
|
foreach ($company_area as $v) {
|
|
|
|
|
$q->orWhere('company_area', 'like', '%' . $v . '%');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 公司地址:模糊匹配关联 company 的 company_address 或 company_city
|
|
|
|
|
if (isset($all['address']) && $all['address'] !== '') {
|
|
|
|
|
|