Merge branch 'main' of ssh://124.243.245.42:2222/zkr/shz-backend

This commit is contained in:
2026-07-03 13:19:52 +08:00
20 changed files with 1591 additions and 79 deletions

View File

@@ -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>

View File

@@ -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) &lt;= 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) &lt;= 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) &lt;= 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

View File

@@ -24,17 +24,18 @@
<result property="delFlag" column="del_flag"/>
<result property="remark" column="remark"/>
<result property="policyTag" column="policy_tag"/>
<result property="status" column="status"/>
</resultMap>
<sql id="selectPolicyInfoListVo">
select id, zcmc, zclx, zc_level, source_unit, accept_unit, publish_time, view_num, create_time, policy_tag
select id, zcmc, zclx, zc_level, source_unit, accept_unit, publish_time, view_num, create_time, policy_tag, status
from policy_info
</sql>
<sql id="selectPolicyInfoDetailVo">
select id, zcmc, zclx, zc_level, source_unit, accept_unit, publish_time,
select id, zcmc, zclx, zc_level, source_unit, accept_unit, publish_time,
zc_content, subsidy_standard, handle_channel, apply_condition,
file_url, file_name, view_num, create_by, create_time, update_by, update_time, remark, policy_tag
file_url, file_name, view_num, create_by, create_time, update_by, update_time, remark, policy_tag, status
from policy_info
</sql>
@@ -53,6 +54,9 @@
</foreach>
]
</if>
<if test="query.status != null">
and (status IS NULL or status = #{query.status})
</if>
</where>
order by publish_time desc, create_time desc
</select>
@@ -70,11 +74,11 @@
insert into policy_info (
zcmc, zclx, zc_level, source_unit, accept_unit, publish_time,
zc_content, subsidy_standard, handle_channel, apply_condition,
file_url, file_name, view_num, create_by, create_time, del_flag, remark, policy_tag
file_url, file_name, view_num, create_by, create_time, del_flag, remark, policy_tag, status
) values (
#{zcmc}, #{zclx}, #{zcLevel}, #{sourceUnit}, #{acceptUnit}, #{publishTime},
#{zcContent}, #{subsidyStandard}, #{handleChannel}, #{applyCondition},
#{fileUrl}, #{fileName}, #{viewNum}, #{createBy}, now(), '0', #{remark}, #{policyTag}
#{fileUrl}, #{fileName}, #{viewNum}, #{createBy}, now(), '0', #{remark}, #{policyTag}, #{status}
)
</insert>
@@ -95,6 +99,7 @@
<if test="fileName != null">file_name = #{fileName},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="policyTag != null">policy_tag = #{policyTag},</if>
<if test="status != null">status = #{status},</if>
update_by = #{updateBy},
update_time = now()
</set>
@@ -109,4 +114,8 @@
</foreach>
</update>
<update id="updateStatus">
update policy_info set status = #{status} where id = #{id}
</update>
</mapper>