添加岗位分页列表
This commit is contained in:
@@ -25,4 +25,131 @@
|
||||
FROM bg_recruit_announcement
|
||||
</select>
|
||||
|
||||
<resultMap id="RecruitAnnouncementListItemVoMap" type="org.jiayunet.pojo.vo.RecruitAnnouncementListItemVo">
|
||||
<id column="id" property="id"/>
|
||||
<result column="company_id" property="companyId"/>
|
||||
<result column="company_name" property="companyName"/>
|
||||
<result column="logo_url" property="logoUrl"/>
|
||||
<result column="title" property="title"/>
|
||||
<result column="major_require" property="majorRequire"/>
|
||||
<result column="apply_end_time" property="applyEndTime"/>
|
||||
<result column="apply_end_desc" property="applyEndDesc"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 分页查询公告列表:多值维度不在此取,由Java侧按id批量组装 -->
|
||||
<select id="selectAnnouncementPage" resultMap="RecruitAnnouncementListItemVoMap">
|
||||
SELECT
|
||||
ra.id,
|
||||
ra.company_id,
|
||||
ra.company_name,
|
||||
c.logo_url,
|
||||
ra.title,
|
||||
ra.major_require,
|
||||
ra.apply_end_time,
|
||||
ra.apply_end_desc
|
||||
FROM bg_recruit_announcement ra
|
||||
INNER JOIN bg_company c ON ra.company_id = c.id
|
||||
WHERE c.status = 1
|
||||
AND ra.status = 1
|
||||
<!-- 筛选条件:发布时间区间 -->
|
||||
<if test="publishTimeStart != null">
|
||||
AND ra.publish_time <![CDATA[>]]> #{publishTimeStart}
|
||||
</if>
|
||||
<if test="publishTimeEnd != null">
|
||||
AND ra.publish_time <![CDATA[<=]]> #{publishTimeEnd}
|
||||
</if>
|
||||
<!-- 筛选条件:投递截止时间区间 -->
|
||||
<if test="applyEndTimeStart != null">
|
||||
AND ra.apply_end_time <![CDATA[>]]> #{applyEndTimeStart}
|
||||
</if>
|
||||
<if test="applyEndTimeEnd != null">
|
||||
AND ra.apply_end_time <![CDATA[<=]]> #{applyEndTimeEnd}
|
||||
</if>
|
||||
<!-- 筛选条件:公司类型 -->
|
||||
<if test="companyTypes != null and companyTypes.size() > 0">
|
||||
AND c.company_type IN
|
||||
<foreach collection="companyTypes" item="type" open="(" separator="," close=")">
|
||||
#{type}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 筛选条件:学历要求 -->
|
||||
<if test="educationNames != null and educationNames.size() > 0">
|
||||
AND ra.id IN (
|
||||
SELECT rae.announcement_id
|
||||
FROM bg_recruit_announcement_education rae
|
||||
WHERE rae.education_name IN
|
||||
<foreach collection="educationNames" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<!-- 筛选条件:招聘届数 -->
|
||||
<if test="recruitYears != null and recruitYears.size() > 0">
|
||||
AND ra.id IN (
|
||||
SELECT ray.announcement_id
|
||||
FROM bg_recruit_announcement_year ray
|
||||
WHERE ray.recruit_year IN
|
||||
<foreach collection="recruitYears" item="year" open="(" separator="," close=")">
|
||||
#{year}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<!-- 筛选条件:批次 -->
|
||||
<if test="batchNames != null and batchNames.size() > 0">
|
||||
AND ra.id IN (
|
||||
SELECT rab.announcement_id
|
||||
FROM bg_recruit_announcement_batch rab
|
||||
WHERE rab.batch_name IN
|
||||
<foreach collection="batchNames" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<!-- 筛选条件:岗位大类 -->
|
||||
<if test="categoryNames != null and categoryNames.size() > 0">
|
||||
AND ra.id IN (
|
||||
SELECT rac.announcement_id
|
||||
FROM bg_recruit_announcement_category rac
|
||||
WHERE rac.category_name IN
|
||||
<foreach collection="categoryNames" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<!-- 筛选条件:热招城市 -->
|
||||
<if test="cityNames != null and cityNames.size() > 0">
|
||||
AND ra.id IN (
|
||||
SELECT ract.announcement_id
|
||||
FROM bg_recruit_announcement_city ract
|
||||
WHERE ract.city_name IN
|
||||
<foreach collection="cityNames" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<!-- 筛选条件:行业 -->
|
||||
<if test="industryNames != null and industryNames.size() > 0">
|
||||
AND ra.id IN (
|
||||
SELECT rai.announcement_id
|
||||
FROM bg_recruit_announcement_industry rai
|
||||
WHERE rai.industry_name IN
|
||||
<foreach collection="industryNames" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<!-- 筛选条件:标签 -->
|
||||
<if test="tagNames != null and tagNames.size() > 0">
|
||||
AND ra.id IN (
|
||||
SELECT rat.announcement_id
|
||||
FROM bg_recruit_announcement_tag rat
|
||||
WHERE rat.tag_name IN
|
||||
<foreach collection="tagNames" item="name" open="(" separator="," close=")">
|
||||
#{name}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
ORDER BY ra.id DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user