PositionAloneInfoMapper.xml
3.08 KB
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
<?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="com.laowu.mapper.PositionAloneInfoMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.laowu.model.PositionAloneInfoDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="company_id" property="companyId" />
<result column="position_status" property="positionStatus" />
<result column="position_name" property="positionName" />
<result column="recruit_type" property="recruitType" />
<result column="province" property="province" />
<result column="city" property="city" />
<result column="county" property="county" />
<result column="job_sort_id" property="jobSortId" />
<result column="position_id" property="positionId" />
<result column="job_id" property="jobId" />
<result column="position_desc" property="positionDesc" />
<result column="position_require" property="positionRequire" />
<result column="start_salary" property="startSalary" />
<result column="end_salary" property="endSalary" />
</resultMap>
<select id="aloneRequirements" resultType="com.laowu.vo.position.AloneRequirementsVO">
SELECT
t.id,
company_id,
t2.company_name,
position_status,
require_counts,
position_name,
recruit_type,
t.province,
t.city,
t.county,
job_sort_id,
t3.job_name,
t4.position_type,
t.position_id,
job_id,
position_desc,
position_require,
start_salary,
end_salary,
t.address
FROM
position_alone_info t
LEFT JOIN company_dict t2 ON t.company_id = t2.id
LEFT JOIN lib_job_sort t3 ON t.job_sort_id = t3.id
LEFT JOIN position_dict t4 ON t.position_id = t4.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
and t3.delete_date IS NULL
and t4.delete_date IS NULL
<if test="positionStatus!= null and positionStatus!=''">
AND t.position_status = #{positionStatus}
</if>
<if test="positionName != null and positionName != ''">
AND t.position_name LIKE concat('%', #{positionName}, '%')
</if>
<if test="positionId != null and positionId != ''">
AND t.position_id = #{positionId}
</if>
<if test="province != null and province !=''">
AND t.province = #{province}
</if>
<if test="city != null and city != ''">
AND t.city = #{city}
</if>
<if test="county != null and county != ''">
AND t.county = #{county}
</if>
</select>
</mapper>