| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
- <?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">
- <!-- namespace必须指向DAO接口 -->
- <mapper namespace="com.jpsoft.employment.modules.job.dao.RecruitmentCollectionDAO">
- <resultMap id="RecruitmentCollectionMap" type="com.jpsoft.employment.modules.job.entity.RecruitmentCollection">
- <id property="id" column="id_" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="delFlag" column="del_flag" />
- <result property="companyId" column="company_id" />
- <result property="sysUserId" column="sys_user_id" />
- <result property="resumeId" column="resume_id" />
- </resultMap>
- <resultMap id="ResumeVOMap" type="com.jpsoft.employment.modules.job.entity.ResumeVO">
- <id property="id" column="id_" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="delFlag" column="del_flag" />
- <result property="jobUserId" column="job_user_id" />
- <result property="sex" column="sex_" />
- <result property="positionCategoryId" column="position_category_id" />
- <result property="positionCategoryName" column="position_category_name" />
- <result property="workExp" column="work_exp" />
- <result property="education" column="education_" />
- <result property="dreamMoney" column="dream_money" />
- <result property="dreamAdd" column="dream_add" />
- <result property="birthday" column="birthday_" />
- <result property="introduction" column="introduction_" />
- <result property="status" column="status_" />
- <result property="approveStatus" column="approve_status" />
- </resultMap>
- <insert id="insert" parameterType="com.jpsoft.employment.modules.job.entity.RecruitmentCollection">
- <!--
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
- select sys_guid() from dual
- </selectKey>
- -->
- <![CDATA[
- insert into job_recruitment_collection
- (id_,create_by,create_time,update_by,update_time,del_flag,company_id,sys_user_id,resume_id)
- values
- (
- #{id,jdbcType=VARCHAR}
- ,#{createBy,jdbcType=VARCHAR}
- ,#{createTime,jdbcType= TIMESTAMP }
- ,#{updateBy,jdbcType=VARCHAR}
- ,#{updateTime,jdbcType= TIMESTAMP }
- ,#{delFlag,jdbcType= NUMERIC }
- ,#{companyId,jdbcType=VARCHAR}
- ,#{sysUserId,jdbcType=VARCHAR}
- ,#{resumeId,jdbcType=VARCHAR}
- )
- ]]>
- </insert>
- <delete id="delete" parameterType="string">
- delete from job_recruitment_collection where id_=#{id,jdbcType=VARCHAR}
- </delete>
- <update id="update" parameterType="com.jpsoft.employment.modules.job.entity.RecruitmentCollection">
- update job_recruitment_collection
- <set>
- <if test="createBy!=null">
- create_by=#{createBy,jdbcType=VARCHAR},
- </if>
- <if test="createTime!=null">
- create_time=#{createTime,jdbcType= TIMESTAMP },
- </if>
- <if test="updateBy!=null">
- update_by=#{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="updateTime!=null">
- update_time=#{updateTime,jdbcType= TIMESTAMP },
- </if>
- <if test="delFlag!=null">
- del_flag=#{delFlag,jdbcType= NUMERIC },
- </if>
- <if test="companyId!=null">
- company_id=#{companyId,jdbcType=VARCHAR},
- </if>
- <if test="sysUserId!=null">
- sys_user_id=#{sysUserId,jdbcType=VARCHAR},
- </if>
- <if test="resumeId!=null">
- resume_id=#{resumeId,jdbcType=VARCHAR},
- </if>
- </set>
- where id_=#{id}
- </update>
- <select id="findByUserIdAndCompanyIdAndResumeId" parameterType="string" resultMap="RecruitmentCollectionMap">
- select * from job_recruitment_collection
- where del_flag=false
- and sys_user_id=#{userId}
- and company_id=#{companyId}
- and resume_id=#{resumeid}
- limit 1
- </select>
- <select id="get" parameterType="string" resultMap="RecruitmentCollectionMap">
- select * from job_recruitment_collection where id_=#{0}
- </select>
- <select id="exist" parameterType="string" resultType="int">
- select count(*) from job_recruitment_collection where id_=#{0}
- </select>
- <select id="list" resultMap="RecruitmentCollectionMap">
- select * from job_recruitment_collection
- </select>
- <select id="countByUserId" resultType="int">
- select count(*) from job_recruitment_collection
- where del_flag = false and company_id=#{companyId} and sys_user_id = #{sysUserId}
- </select>
- <select id="search" parameterType="hashmap" resultMap="RecruitmentCollectionMap">
- <![CDATA[
- select * from job_recruitment_collection a left join job_resume b on a.resume_id = b.id_
- ]]>
- <where>
- a.del_flag = false and b.del_flag = false
- <if test="searchParams.sysUserId != null">
- and a.sys_user_id = #{searchParams.sysUserId}
- </if>
- <if test="searchParams.positionCategoryId != null">
- and b.position_category_id = #{searchParams.positionCategoryId}
- </if>
- <if test="searchParams.sex != null">
- and b.sex_ = #{searchParams.sex}
- </if>
- <if test="searchParams.workExp != null">
- and b.work_exp = #{searchParams.workExp}
- </if>
- <if test="searchParams.education != null">
- and b.education_ = #{searchParams.education}
- </if>
- <if test="searchParams.curDate != null">
- <![CDATA[
- and a.birthday_ <= #{searchParams.curDate}
- ]]>
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
- <!--用于移动端接口:招聘方【收藏简历】-->
- <select id="pagedLoadCollectResumes" parameterType="hashMap" resultType="Map">
- <![CDATA[
- select * from (select
- c.sys_user_id hrId,
- c.resume_id resumeId,
- ju.real_name realName,
- ju.head_image_url headImage,
- ju.address_ address,
- year(now())-year(ju.birthday_) age,
- w.name_ positionCategoryName,
- workExpw.name_ workExp,
- eduw.name_ eduName,
- sexw.name_ sex,
- jobstaw.name_ jobStatus,
- drmoneyw.name_ dreamMoney,
- c.update_time collectionTime,
- c.del_flag,
- r.education_,
- r.work_exp,
- r.dream_money,
- r.job_status,
- r.position_category_id
- from job_recruitment_collection c inner join job_resume r on c.resume_id=r.id_
- inner join job_jobuser ju on r.job_user_id=ju.id_ and ju.del_flag=0
- left join job_work_category w on r.position_category_id=w.id_ and w.del_flag=0
- left join sys_data_dictionary workExpw on r.work_exp=workExpw.id_ and workExpw.del_flag=0
- left join sys_data_dictionary eduw on r.education_=eduw.id_ and eduw.del_flag=0
- LEFT JOIN sys_data_dictionary sexw ON r.sex_ = sexw.value_ and sexw.parent_id = '0c3194dc-884d-4ea9-9966-dfb94f537f5c' AND sexw.del_flag = 0
- left join sys_data_dictionary jobstaw on r.job_status=jobstaw.id_ and jobstaw.del_flag=0
- left join sys_data_dictionary drmoneyw on r.dream_money=drmoneyw.id_ and drmoneyw.del_flag=0
- ) tab
- ]]>
- <where>
- <if test="1==1">
- and del_flag=0 and hrId = #{searchParams.recruiterId}
- </if>
- <if test="searchParams.positionName != null and searchParams.positionName !=''">
- and positionCategoryName like #{searchParams.positionName}
- </if>
- <if test="searchParams.positionId != null and searchParams.positionId !=''">
- and position_category_id in (select id_ from job_work_category where instr(code_,#{searchParams.positionId})>0)
- </if>
- <if test="searchParams.education != null and searchParams.education != ''">
- and education_ = #{searchParams.education}
- </if>
- <if test="searchParams.workExp != null and searchParams.workExp !='' ">
- and work_exp = #{searchParams.workExp}
- </if>
-
- <if test="searchParams.dreamMoney != null and searchParams.dreamMoney !=''">
- and dream_money = #{searchParams.dreamMoney}
- </if>
- <if test="searchParams.jobStatus != null and searchParams.jobStatus != ''">
- and job_status = #{searchParams.jobStatus}
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
-
- <!-- 用于移动端接口:招聘方【收藏简历】 取消收藏 -->
- <update id="updateCancelCollect">
- update job_recruitment_collection set del_flag=1,update_time=now(),update_by=#{hrId} where resume_id=#{resumeId} and sys_user_id=#{hrId}
- </update>
- <!--用于移动端接口:招聘方【招聘主页】-->
- <select id="pagedLoadAllResumes" parameterType="hashMap" resultType="Map">
- <![CDATA[
- select DISTINCT * from (select
- ju.real_name realName,
- ju.head_image_url headImage,
- ju.address_ address,
- year(now())-year(ju.birthday_) age,
- w.name_ positionCategoryName,
- workExpw.name_ workExp,
- eduw.name_ eduName,
- sexw.name_ sex,
- jobstaw.name_ jobStatus,
- drmoneyw.name_ dreamMoney,
- r.id_ as resumeId,
- r.del_flag,
- r.update_time,
- rede.chat_status,
- rerd.browse_count,
- r.education_,
- r.work_exp,
- r.dream_money,
- r.job_status,
- r.position_category_id
- from job_resume r
- inner join job_jobuser ju on r.job_user_id=ju.id_ and ju.del_flag=0
- left join job_resume_deliver rede on r.id_=rede.job_resume_id and rede.del_flag=0
- left join job_work_category w on r.position_category_id=w.id_ and w.del_flag=0
- left join sys_data_dictionary workExpw on r.work_exp=workExpw.id_ and workExpw.del_flag=0
- left join sys_data_dictionary eduw on r.education_=eduw.id_ and eduw.del_flag=0
- LEFT JOIN sys_data_dictionary sexw ON r.sex_ = sexw.value_ and sexw.parent_id = '0c3194dc-884d-4ea9-9966-dfb94f537f5c' AND sexw.del_flag = 0
- left join sys_data_dictionary jobstaw on r.job_status=jobstaw.id_ and jobstaw.del_flag=0
- left join sys_data_dictionary drmoneyw on r.dream_money=drmoneyw.id_ and drmoneyw.del_flag=0
- left join (select count(1) browse_count,job_resume_id from job_user_browse_hr where del_flag=0 group by job_resume_id) rerd on r.id_=rerd.job_resume_id
- ) tab
- ]]>
- <where>
- <if test="1==1">
- <![CDATA[ and del_flag=0 and (chat_status is null or chat_status <>'5') ]]> <!--非已入职的简历sys_data_dictionary where parent_id=5e048b6d-cb1d-4fd5-bc70-c94259960862-->
- </if>
- <if test="searchParams.positionName != null and searchParams.positionName !=''">
- and positionCategoryName like #{searchParams.positionName}
- </if>
- <if test="searchParams.positionId != null and searchParams.positionId !=''">
- and position_category_id in (select id_ from job_work_category where instr(code_,#{searchParams.positionId})>0)
- </if>
- <if test="searchParams.education != null and searchParams.education != ''">
- and education_ = #{searchParams.education}
- </if>
- <if test="searchParams.workExp != null and searchParams.workExp !='' ">
- and work_exp = #{searchParams.workExp}
- </if>
-
- <if test="searchParams.dreamMoney != null and searchParams.dreamMoney !=''">
- and dream_money = #{searchParams.dreamMoney}
- </if>
- <if test="searchParams.jobStatus != null and searchParams.jobStatus != ''">
- and job_status = #{searchParams.jobStatus}
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
- </mapper>
|