This commit is contained in:
杨志
2026-01-06 14:09:11 +08:00
parent 20cad6535d
commit edb63cb379

View File

@@ -201,9 +201,10 @@ class MatchService
$q->where('education_require', 'like', '%本科%') $q->where('education_require', 'like', '%本科%')
->where('education_require', 'like', '%硕士%', 'or') ->where('education_require', 'like', '%硕士%', 'or')
->where('education_require', 'like', '%博士%', 'or') ->where('education_require', 'like', '%博士%', 'or')
->where('education_require', '=', '', 'or') ->where('education_require', '=', '', 'or');
->whereRaw('education_require IS NULL', [], 'or');
}); });
// NULL 值检查使用 whereRaw单独添加
$query->whereRaw('(education_require IS NULL OR education_require = \'\')', [], 'or');
} }
} }
@@ -216,9 +217,10 @@ class MatchService
$query->where(function($q) use ($resume) { $query->where(function($q) use ($resume) {
$q->where('sex_require', '不限制') $q->where('sex_require', '不限制')
->where('sex_require', $resume['gender'], 'or') ->where('sex_require', $resume['gender'], 'or')
->where('sex_require', '', 'or') ->where('sex_require', '', 'or');
->whereRaw('sex_require IS NULL', [], 'or');
}); });
// NULL 值检查使用 whereRaw单独添加
$query->whereRaw('(sex_require IS NULL OR sex_require = \'\')', [], 'or');
} }
// 获取过滤后的岗位 // 获取过滤后的岗位