完善招聘信息主键关联与工作经历维护
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
|
||||
<!-- 招聘信息ResultMap -->
|
||||
<resultMap type="com.ruoyi.info.collection.domain.vo.CcdiStaffRecruitmentVO" id="CcdiStaffRecruitmentVOResult">
|
||||
<id property="recruitId" column="recruit_id"/>
|
||||
<id property="id" column="id"/>
|
||||
<result property="recruitId" column="recruit_id"/>
|
||||
<result property="recruitName" column="recruit_name"/>
|
||||
<result property="posName" column="pos_name"/>
|
||||
<result property="posCategory" column="pos_category"/>
|
||||
@@ -33,17 +34,17 @@
|
||||
<!-- 分页查询招聘信息列表 -->
|
||||
<select id="selectRecruitmentPage" resultMap="CcdiStaffRecruitmentVOResult">
|
||||
SELECT
|
||||
r.recruit_id, r.recruit_name, r.pos_name, r.pos_category, r.pos_desc,
|
||||
r.id, r.recruit_id, r.recruit_name, r.pos_name, r.pos_category, r.pos_desc,
|
||||
r.cand_name, r.recruit_type, r.cand_edu, r.cand_id, r.cand_school, r.cand_major, r.cand_grad,
|
||||
r.admit_status, COALESCE(w.work_experience_count, 0) AS work_experience_count,
|
||||
r.interviewer_name1, r.interviewer_id1, r.interviewer_name2, r.interviewer_id2,
|
||||
r.created_by, r.create_time, r.updated_by, r.update_time
|
||||
FROM ccdi_staff_recruitment r
|
||||
LEFT JOIN (
|
||||
SELECT recruit_id COLLATE utf8mb4_general_ci AS recruit_id, COUNT(1) AS work_experience_count
|
||||
SELECT recruitment_id, COUNT(1) AS work_experience_count
|
||||
FROM ccdi_staff_recruitment_work
|
||||
GROUP BY recruit_id COLLATE utf8mb4_general_ci
|
||||
) w ON w.recruit_id COLLATE utf8mb4_general_ci = r.recruit_id COLLATE utf8mb4_general_ci
|
||||
GROUP BY recruitment_id
|
||||
) w ON w.recruitment_id = r.id
|
||||
<where>
|
||||
<if test="query.recruitName != null and query.recruitName != ''">
|
||||
AND r.recruit_name LIKE CONCAT('%', #{query.recruitName}, '%')
|
||||
@@ -78,16 +79,16 @@
|
||||
<!-- 查询招聘信息详情 -->
|
||||
<select id="selectRecruitmentById" resultMap="CcdiStaffRecruitmentVOResult">
|
||||
SELECT
|
||||
recruit_id, recruit_name, pos_name, pos_category, pos_desc,
|
||||
id, recruit_id, recruit_name, pos_name, pos_category, pos_desc,
|
||||
cand_name, recruit_type, cand_edu, cand_id, cand_school, cand_major, cand_grad,
|
||||
admit_status, interviewer_name1, interviewer_id1, interviewer_name2, interviewer_id2,
|
||||
created_by, create_time, updated_by, update_time
|
||||
FROM ccdi_staff_recruitment
|
||||
WHERE recruit_id = #{recruitId}
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 批量插入招聘信息数据 -->
|
||||
<insert id="insertBatch">
|
||||
<insert id="insertBatch" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO ccdi_staff_recruitment
|
||||
(recruit_id, recruit_name, pos_name, pos_category, pos_desc,
|
||||
cand_name, recruit_type, cand_edu, cand_id, cand_school, cand_major, cand_grad,
|
||||
@@ -124,7 +125,7 @@
|
||||
interviewer_id2 = #{item.interviewerId2},
|
||||
updated_by = #{item.updatedBy},
|
||||
update_time = NOW()
|
||||
WHERE recruit_id = #{item.recruitId}
|
||||
WHERE id = #{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user