AI 业务逻辑完善

This commit is contained in:
2026-01-21 13:42:38 +08:00
parent 474a71c4db
commit fb05cadd0f
14 changed files with 824 additions and 389 deletions

View File

@@ -26,6 +26,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="aiMatchScore" column="ai_match_score" />
<result property="aiMatchScorePercentage" column="ai_match_score_percentage" />
<result property="status" column="status" />
<result property="aiCvScoringRankingJson" column="ai_cv_scoring_ranking_json" />
<result property="aiCvScore" column="ai_cv_score" />
<result property="candidateCompatibilityJson" column="candidate_compatibility_json" />
<result property="candidateCompatibilityScore" column="candidate_compatibility_score" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
@@ -37,7 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectHotakeRolesApplyInfoVo">
select id, candidate_id,recruiter_id, role_id, full_name, email, phone_number, cv_file, cv_file_suffix,file_size_show,
cover_letter, candidate_status, stage, last_contact, cv_template_json, cv_score, cv_md5, experience, ai_match_score,
ai_match_score_percentage,status, del_flag, create_by, create_time, update_by, update_time, remark from hotake_roles_apply_info
ai_match_score_percentage,status, ai_cv_scoring_ranking_json,ai_cv_score,candidate_compatibility_json,candidate_compatibility_score,
del_flag, create_by, create_time, update_by, update_time, remark from hotake_roles_apply_info
</sql>
<select id="selectHotakeRolesApplyInfoList" parameterType="HotakeRolesApplyInfo" resultMap="HotakeRolesApplyInfoResult">
@@ -65,6 +73,76 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null "> and status = #{status}</if>
</where>
</select>
<select id="selectHotakeRolesApplyInfoRankingList" parameterType="HotakeRolesApplyInfo" resultMap="HotakeRolesApplyInfoResult">
<include refid="selectHotakeRolesApplyInfoVo"/>
<where>
<if test="candidateId != null "> and candidate_id = #{candidateId}</if>
<if test="recruiterId != null "> and recruiter_id = #{recruiterId}</if>
<if test="roleId != null "> and role_id = #{roleId}</if>
<if test="fullName != null and fullName != ''"> and full_name like concat('%', #{fullName}, '%')</if>
<if test="email != null and email != ''"> and email = #{email}</if>
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
<if test="cvFile != null and cvFile != ''"> and cv_file = #{cvFile}</if>
<if test="cvFileSuffix != null and cvFileSuffix != ''"> and cv_file_suffix = #{cvFileSuffix}</if>
<if test="coverLetter != null and coverLetter != ''"> and cover_letter = #{coverLetter}</if>
<if test="candidateStatus != null and candidateStatus != ''"> and candidate_status = #{candidateStatus}</if>
<if test="stage != null and stage != ''"> and stage = #{stage}</if>
<if test="lastContact != null and lastContact != ''"> and last_contact = #{lastContact}</if>
<if test="cvTemplateJson != null and cvTemplateJson != ''"> and cv_template_json = #{cvTemplateJson}</if>
<if test="cvScore != null and cvScore != ''"> and cv_score = #{cvScore}</if>
<if test="cvMd5 != null and cvMd5 != ''"> and cv_md5 = #{cvMd5}</if>
<if test="experience != null and experience != ''"> and experience = #{experience}</if>
<if test="aiMatchScore != null and aiMatchScore != ''"> and ai_match_score = #{aiMatchScore}</if>
<if test="aiMatchScorePercentage != null "> and ai_match_score_percentage = #{aiMatchScorePercentage}</if>
<if test="status != null "> and status = #{status}</if>
<if test="applyRoleIdList != null ">
and id in
<foreach item="applyRoleId" collection="applyRoleIdList" open="(" separator="," close=")">
#{applyRoleId}
</foreach>
</if>
</where>
order by ai_cv_score DESC
</select>
<select id="selectHotakeRolesApplyInfoCompatibilityScoreList" parameterType="HotakeRolesApplyInfo" resultMap="HotakeRolesApplyInfoResult">
<include refid="selectHotakeRolesApplyInfoVo"/>
<where>
<if test="candidateId != null "> and candidate_id = #{candidateId}</if>
<if test="recruiterId != null "> and recruiter_id = #{recruiterId}</if>
<if test="roleId != null "> and role_id = #{roleId}</if>
<if test="fullName != null and fullName != ''"> and full_name like concat('%', #{fullName}, '%')</if>
<if test="email != null and email != ''"> and email = #{email}</if>
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
<if test="cvFile != null and cvFile != ''"> and cv_file = #{cvFile}</if>
<if test="cvFileSuffix != null and cvFileSuffix != ''"> and cv_file_suffix = #{cvFileSuffix}</if>
<if test="coverLetter != null and coverLetter != ''"> and cover_letter = #{coverLetter}</if>
<if test="candidateStatus != null and candidateStatus != ''"> and candidate_status = #{candidateStatus}</if>
<if test="stage != null and stage != ''"> and stage = #{stage}</if>
<if test="lastContact != null and lastContact != ''"> and last_contact = #{lastContact}</if>
<if test="cvTemplateJson != null and cvTemplateJson != ''"> and cv_template_json = #{cvTemplateJson}</if>
<if test="cvScore != null and cvScore != ''"> and cv_score = #{cvScore}</if>
<if test="cvMd5 != null and cvMd5 != ''"> and cv_md5 = #{cvMd5}</if>
<if test="experience != null and experience != ''"> and experience = #{experience}</if>
<if test="aiMatchScore != null and aiMatchScore != ''"> and ai_match_score = #{aiMatchScore}</if>
<if test="aiMatchScorePercentage != null "> and ai_match_score_percentage = #{aiMatchScorePercentage}</if>
<if test="status != null "> and status = #{status}</if>
<if test="applyRoleIdList != null ">
and id in
<foreach item="applyRoleId" collection="applyRoleIdList" open="(" separator="," close=")">
#{applyRoleId}
</foreach>
</if>
</where>
order by candidate_compatibility_score DESC
</select>
<select id="selectHotakeRolesApplyInfoById" parameterType="Long" resultMap="HotakeRolesApplyInfoResult">
<include refid="selectHotakeRolesApplyInfoVo"/>
@@ -94,6 +172,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="aiMatchScore != null">ai_match_score,</if>
<if test="aiMatchScorePercentage != null">ai_match_score_percentage,</if>
<if test="status != null">status,</if>
<if test="aiCvScoringRankingJson != null">ai_cv_scoring_ranking_json,</if>
<if test="aiCvScore != null">ai_cv_score,</if>
<if test="candidateCompatibilityJson != null">candidate_compatibility_json,</if>
<if test="candidateCompatibilityScore != null">candidate_compatibility_score,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
@@ -122,6 +206,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="aiMatchScore != null">#{aiMatchScore},</if>
<if test="aiMatchScorePercentage != null">#{aiMatchScorePercentage},</if>
<if test="status != null">#{status},</if>
<if test="aiCvScoringRankingJson != null">#{aiCvScoringRankingJson},</if>
<if test="aiCvScore != null">#{aiCvScore},</if>
<if test="candidateCompatibilityJson != null">#{candidateCompatibilityJson},</if>
<if test="candidateCompatibilityScore != null">#{candidateCompatibilityScore},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
@@ -154,6 +244,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="aiMatchScore != null">ai_match_score = #{aiMatchScore},</if>
<if test="aiMatchScorePercentage != null">ai_match_score_percentage = #{aiMatchScorePercentage},</if>
<if test="status != null">status = #{status},</if>
<if test="aiCvScoringRankingJson != null">ai_cv_scoring_ranking_json = #{aiCvScoringRankingJson},</if>
<if test="aiCvScore != null">ai_cv_score = #{aiCvScore},</if>
<if test="candidateCompatibilityJson != null">candidate_compatibility_json = #{candidateCompatibilityJson},</if>
<if test="candidateCompatibilityScore != null">candidate_compatibility_score = #{candidateCompatibilityScore},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
@@ -176,7 +272,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<insert id="batchInsertHotakeRolesApplyInfo">
insert into hotake_roles_apply_info( id, candidate_id,recruiter_id, role_id, full_name, email, phone_number, cv_file, cover_letter, candidate_status, stage, last_contact, cv_template_json, cv_score, cv_md5, experience, ai_match_score, ai_match_score_percentage, del_flag, create_by, create_time, update_by, update_time, remark) values
insert into hotake_roles_apply_info( id, candidate_id,recruiter_id, role_id, full_name, email, phone_number, cv_file, cover_letter,
candidate_status, stage, last_contact, cv_template_json, cv_score, cv_md5, experience,
ai_match_score, ai_match_score_percentage, del_flag, create_by, create_time, update_by, update_time, remark) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.candidateId},#{item.recruiterId}, #{item.roleId}, #{item.fullName}, #{item.email}, #{item.phoneNumber}, #{item.cvFile}, #{item.coverLetter}, #{item.candidateStatus}, #{item.stage}, #{item.lastContact}, #{item.cvTemplateJson}, #{item.cvScore}, #{item.cvMd5}, #{item.experience}, #{item.aiMatchScore}, #{item.aiMatchScorePercentage}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
</foreach>