Merge branch 'main' of ssh://124.243.245.42:2222/zkr/shz-backend
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
<select id="getInterviewInvitationList" resultMap="InterviewInvitationResult" parameterType="InterviewInvitation">
|
||||
<include refid="selectInterviewInvitationVo"/>
|
||||
<where> del_flag = '0'
|
||||
<if test="id != null and id != ''"> and id = #{id}</if>
|
||||
<if test="companyId != null and companyId != ''"> and company_id = #{companyId}</if>
|
||||
<if test="jobId != null and jobId != ''"> and job_id = #{jobId}</if>
|
||||
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
||||
@@ -73,6 +74,7 @@
|
||||
left join job j on j.job_id = t.job_id and j.del_flag = '0'
|
||||
left join app_user u on u.user_id = t.user_id and u.del_flag = '0'
|
||||
<where> t.del_flag = '0'
|
||||
<if test="id != null and id != ''"> and t.id = #{id}</if>
|
||||
<if test="companyId != null and companyId != ''"> and t.company_id = #{companyId}</if>
|
||||
<if test="jobId != null and jobId != ''"> and t.job_id = #{jobId}</if>
|
||||
<if test="userId != null and userId != ''"> and t.user_id = #{userId}</if>
|
||||
|
||||
@@ -385,27 +385,28 @@
|
||||
FROM (
|
||||
SELECT
|
||||
r.*,
|
||||
ja.id AS apply_id,
|
||||
CASE
|
||||
WHEN CAST(j.job_id AS TEXT) = ANY(string_to_array(r.job_title_id, ','))
|
||||
WHEN (CAST(p.job_category AS TEXT) = ANY(string_to_array(r.job_title_id, ',')) OR p.job_category IS NULL)
|
||||
AND ((CAST(r.salary_min AS INTEGER) <= p.max_salary AND CAST(r.salary_max AS INTEGER) >= p.min_salary) OR p.max_salary IS NULL)
|
||||
AND (CAST(r.area AS INTEGER) = CAST(p.job_location_area_code AS INTEGER) OR p.job_location_area_code IS NULL)
|
||||
AND (CAST(r.education AS INTEGER) >=CAST(p.education AS INTEGER) OR p.education IS NULL OR p.education = '-1')
|
||||
THEN 1
|
||||
WHEN CAST(j.job_id AS TEXT) = ANY(string_to_array(r.job_title_id, ','))
|
||||
WHEN (CAST(p.job_category AS TEXT) = ANY(string_to_array(r.job_title_id, ',')) OR p.job_category IS NULL)
|
||||
AND ((CAST(r.salary_min AS INTEGER) <= p.max_salary AND CAST(r.salary_max AS INTEGER) >= p.min_salary) OR p.max_salary IS NULL)
|
||||
AND (CAST(r.area AS INTEGER) = CAST(p.job_location_area_code AS INTEGER) OR p.job_location_area_code IS NULL)
|
||||
THEN 2
|
||||
WHEN CAST(j.job_id AS TEXT) = ANY(string_to_array(r.job_title_id, ','))
|
||||
WHEN (CAST(p.job_category AS TEXT) = ANY(string_to_array(r.job_title_id, ',')) OR p.job_category IS NULL)
|
||||
AND ((CAST(r.salary_min AS INTEGER) <= p.max_salary AND CAST(r.salary_max AS INTEGER) >= p.min_salary) OR p.max_salary IS NULL)
|
||||
THEN 3
|
||||
WHEN (CAST(j.job_id AS TEXT) = ANY(string_to_array(r.job_title_id, ',')) OR p.job_category IS NULL)
|
||||
WHEN (CAST(p.job_category AS TEXT) = ANY(string_to_array(r.job_title_id, ',')) OR p.job_category IS NULL)
|
||||
THEN 4
|
||||
ELSE 5
|
||||
END AS match_level
|
||||
FROM shz.job p
|
||||
JOIN shz.app_user r ON r.del_flag = '0'
|
||||
JOIN shz.job_title j ON j.job_name = p.job_category
|
||||
WHERE p.job_id = #{jobId}
|
||||
LEFT JOIN shz.job_apply ja ON ja.user_id = r.user_id AND ja.job_id = p.job_id AND ja.del_flag = '0'
|
||||
WHERE r.is_company_user = '1' and p.job_id = #{jobId}
|
||||
) c
|
||||
) t
|
||||
WHERE best_rn = 1
|
||||
|
||||
Reference in New Issue
Block a user