修改3
This commit is contained in:
@@ -197,14 +197,14 @@ class MatchService
|
|||||||
// 这里简化处理,实际可以根据数据库中的具体值调整
|
// 这里简化处理,实际可以根据数据库中的具体值调整
|
||||||
if ($actualLevel >= 3) {
|
if ($actualLevel >= 3) {
|
||||||
// 如果是本科及以上,可以匹配"本科"、"本科及以上"等要求
|
// 如果是本科及以上,可以匹配"本科"、"本科及以上"等要求
|
||||||
|
// 简化逻辑:空字符串和NULL在业务上等价,只检查空字符串即可
|
||||||
|
// 如果需要检查NULL,可以在后续的匹配逻辑中处理
|
||||||
$query->where(function($q) {
|
$query->where(function($q) {
|
||||||
$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');
|
||||||
});
|
});
|
||||||
// NULL 值检查使用 whereRaw,单独添加
|
|
||||||
$query->whereRaw('(education_require IS NULL OR education_require = \'\')', [], 'or');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,8 +219,6 @@ class MatchService
|
|||||||
->where('sex_require', $resume['gender'], 'or')
|
->where('sex_require', $resume['gender'], 'or')
|
||||||
->where('sex_require', '', 'or');
|
->where('sex_require', '', 'or');
|
||||||
});
|
});
|
||||||
// NULL 值检查使用 whereRaw,单独添加
|
|
||||||
$query->whereRaw('(sex_require IS NULL OR sex_require = \'\')', [], 'or');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取过滤后的岗位
|
// 获取过滤后的岗位
|
||||||
|
|||||||
Reference in New Issue
Block a user