智慧保安后台管理-外网项目备份
zhongrj
2023-09-17 8853292babb2ad94de4a3207966f1e83b767cd2d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?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 &gt;= #{recruitment.startTime}
        </if>
        <if test="recruitment.endTime!=null and recruitment.endTime!=''">
            and sr.end_time &lt;= #{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 &lt;= #{recruitment.maxSalary} and sr.max_salary &gt;= #{recruitment.maxSalary}
            </if>
            <if test="recruitment.maxSalary==null and recruitment.minSalary!=null">
                and sr.min_salary &lt;= #{recruitment.minSalary} and sr.max_salary &gt;= #{recruitment.minSalary}
            </if>
            <if test="recruitment.maxSalary!=null and recruitment.minSalary!=null">
                and sr.max_salary &lt;= #{recruitment.maxSalary} and sr.max_salary &gt;= #{recruitment.minSalary}
                or ( sr.min_salary &lt;= #{recruitment.maxSalary} and sr.min_salary &gt;= #{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>