<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="org.springblade.modules.recruitment.mapper.RecruitmentMapper">
|
|
<!--招聘分页信息-->
|
<select id="selectRecruitmentPage" resultType="org.springblade.modules.recruitment.vo.RecruitmentVo">
|
SELECT
|
sr.*,bt.dept_name AS tenantName
|
FROM
|
sys_recruitment sr
|
LEFT JOIN
|
blade_dept bt
|
ON
|
sr.dept_id = bt.id
|
left join
|
sys_information si
|
on
|
si.departmentid = bt.id
|
left join
|
sys_jurisdiction sj
|
on
|
sj.id = si.jurisdiction
|
WHERE
|
1=1
|
<if test="recruitment.jurisdiction!=null and recruitment.jurisdiction!='' and recruitment.jurisdiction!='1372091709474910209'">
|
and (sj.id = #{recruitment.jurisdiction} or sj.parent_id = #{recruitment.jurisdiction})
|
</if>
|
<if test="recruitment.tenantName!=null and recruitment.tenantName!=''">
|
and bt.dept_name like concat('%', #{recruitment.tenantName},'%')
|
</if>
|
<if test="recruitment.welfare!=null and recruitment.welfare!=''">
|
and sr.welfare like concat('%', #{recruitment.welfare},'%')
|
</if>
|
<if test="recruitment.unitsScale!=null and recruitment.unitsScale!=''">
|
and sr.units_scale like concat('%', #{recruitment.unitsScale},'%')
|
</if>
|
<if test="recruitment.province!=null">
|
and sr.province = #{recruitment.province}
|
</if>
|
<if test="recruitment.city!=null">
|
and sr.city = #{recruitment.city}
|
</if>
|
<if test="recruitment.district!=null">
|
and sr.district = #{recruitment.district}
|
</if>
|
<if test="recruitment.permit!=null">
|
and sr.permit = #{recruitment.permit}
|
</if>
|
<if test="recruitment.deptId!=null">
|
and sr.dept_id = #{recruitment.deptId}
|
</if>
|
<if test="recruitment.education!=null and recruitment.education!=''">
|
and sr.education = #{recruitment.education}
|
</if>
|
<if test="recruitment.startTime!=null and recruitment.startTime!=''">
|
and sr.start_time >= #{recruitment.startTime}
|
</if>
|
<if test="recruitment.endTime!=null and recruitment.endTime!=''">
|
and sr.end_time <= #{recruitment.endTime}
|
</if>
|
<if test="recruitment.minSalary!=null or recruitment.maxSalary!=null">
|
<if test="recruitment.minSalary==null and recruitment.maxSalary!=null">
|
and sr.min_salary <= #{recruitment.maxSalary} and sr.max_salary >= #{recruitment.maxSalary}
|
</if>
|
<if test="recruitment.maxSalary==null and recruitment.minSalary!=null">
|
and sr.min_salary <= #{recruitment.minSalary} and sr.max_salary >= #{recruitment.minSalary}
|
</if>
|
<if test="recruitment.maxSalary!=null and recruitment.minSalary!=null">
|
and sr.max_salary <= #{recruitment.maxSalary} and sr.max_salary >= #{recruitment.minSalary}
|
or ( sr.min_salary <= #{recruitment.maxSalary} and sr.min_salary >= #{recruitment.minSalary})
|
</if>
|
</if>
|
|
order by sr.create_time desc
|
</select>
|
|
<!--招聘详情信息-->
|
<select id="selectRecruitmentInfo" resultType="org.springblade.modules.recruitment.vo.RecruitmentVo">
|
SELECT
|
sr.*,bt.dept_name AS tenantName
|
FROM
|
sys_recruitment sr
|
LEFT JOIN
|
blade_dept bt
|
ON
|
sr.dept_id = bt.id
|
WHERE
|
1=1
|
<if test="recruitment.id!=null">
|
and sr.id = #{recruitment.id}
|
</if>
|
</select>
|
</mapper>
|