| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- <?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.RecruitmentDAO">
- <resultMap id="RecruitmentMap" type="com.jpsoft.employment.modules.job.entity.Recruitment">
- <id property="id" column="id_" />
- <result property="companyId" column="company_id" />
- <result property="title" column="title_" />
- <result property="area" column="area_" />
- <result property="address" column="address_" />
- <result property="position" column="position_" />
- <result property="positionMessage" column="position_message" />
- <result property="requirements" column="requirements_" />
- <result property="positionNumber" column="position_number" />
- <result property="workYear" column="work_year" />
- <result property="education" column="education_" />
- <result property="positionSex" column="position_sex" />
- <result property="readTimes" column="read_times" />
- <result property="wageType" column="wage_type" />
- <result property="isDiscussPersonally" column="is_discuss_personally" />
- <result property="contactPerson" column="contact_person" />
- <result property="tel" column="tel_" />
- <result property="status" column="status_" />
- <result property="approveStatus" column="approve_status" />
- <result property="readingTimes" column="reading_times" />
- <result property="collectionTimes" column="collection_times" />
- <result property="deliveryTimes" column="delivery_times" />
- <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="workCategoryId" column="work_category_id" />
- <result property="welfare" column="welfare_" />
- </resultMap>
- <resultMap id="RecruitmentVOMap" type="com.jpsoft.employment.modules.job.entity.RecruitmentVO" extends="RecruitmentMap">
- <result property="positionName" column="position_name" />
- </resultMap>
- <insert id="insert" parameterType="com.jpsoft.employment.modules.job.entity.Recruitment">
- <!--
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
- select sys_guid() from dual
- </selectKey>
- -->
- <![CDATA[
- insert into job_recruitment
- (id_,company_id,title_,area_,address_,position_,position_message,requirements_,position_number,work_year,education_,position_sex,read_times,wage_type,is_discuss_personally,contact_person,tel_,status_,approve_status,reading_times,collection_times,delivery_times,create_by,create_time,update_by,update_time,del_flag,work_category_id,welfare_)
- values
- (
- #{id,jdbcType=VARCHAR}
- ,#{companyId,jdbcType=VARCHAR}
- ,#{title,jdbcType=VARCHAR}
- ,#{area,jdbcType=VARCHAR}
- ,#{address,jdbcType=VARCHAR}
- ,#{position,jdbcType=VARCHAR}
- ,#{positionMessage,jdbcType=VARCHAR}
- ,#{requirements,jdbcType=VARCHAR}
- ,#{positionNumber,jdbcType= NUMERIC }
- ,#{workYear,jdbcType=VARCHAR}
- ,#{education,jdbcType=VARCHAR}
- ,#{positionSex,jdbcType=VARCHAR}
- ,#{readTimes,jdbcType= NUMERIC }
- ,#{wageType,jdbcType=VARCHAR}
- ,#{isDiscussPersonally,jdbcType= NUMERIC }
- ,#{contactPerson,jdbcType=VARCHAR}
- ,#{tel,jdbcType=VARCHAR}
- ,#{status,jdbcType=VARCHAR}
- ,#{approveStatus,jdbcType=VARCHAR}
- ,#{readingTimes,jdbcType= NUMERIC }
- ,#{collectionTimes,jdbcType= NUMERIC }
- ,#{deliveryTimes,jdbcType= NUMERIC }
- ,#{createBy,jdbcType=VARCHAR}
- ,#{createTime,jdbcType= TIMESTAMP }
- ,#{updateBy,jdbcType=VARCHAR}
- ,#{updateTime,jdbcType= TIMESTAMP }
- ,#{delFlag,jdbcType= NUMERIC }
- ,#{workCategoryId,jdbcType= VARCHAR }
- ,#{welfare,jdbcType= VARCHAR }
- )
- ]]>
- </insert>
- <delete id="delete" parameterType="string">
- delete from job_recruitment where id_=#{id,jdbcType=VARCHAR}
- </delete>
- <update id="update" parameterType="com.jpsoft.employment.modules.job.entity.Recruitment">
- update job_recruitment
- <set>
- <if test="companyId!=null">
- company_id=#{companyId,jdbcType=VARCHAR},
- </if>
- <if test="title!=null">
- title_=#{title,jdbcType=VARCHAR},
- </if>
- <if test="area!=null">
- area_=#{area,jdbcType=VARCHAR},
- </if>
- <if test="address!=null">
- address_=#{address,jdbcType=VARCHAR},
- </if>
- <if test="position!=null">
- position_=#{position,jdbcType=VARCHAR},
- </if>
- <if test="positionMessage!=null">
- position_message=#{positionMessage,jdbcType=VARCHAR},
- </if>
- <if test="requirements!=null">
- requirements_=#{requirements,jdbcType=VARCHAR},
- </if>
- <if test="positionNumber!=null">
- position_number=#{positionNumber,jdbcType= NUMERIC },
- </if>
- <if test="workYear!=null">
- work_year=#{workYear,jdbcType=VARCHAR},
- </if>
- <if test="education!=null">
- education_=#{education,jdbcType=VARCHAR},
- </if>
- <if test="positionSex!=null">
- position_sex=#{positionSex,jdbcType=VARCHAR},
- </if>
- <if test="readTimes!=null">
- read_times=#{readTimes,jdbcType= NUMERIC },
- </if>
- <if test="wageType!=null">
- wage_type=#{wageType,jdbcType=VARCHAR},
- </if>
- <if test="isDiscussPersonally!=null">
- is_discuss_personally=#{isDiscussPersonally,jdbcType= NUMERIC },
- </if>
- <if test="contactPerson!=null">
- contact_person=#{contactPerson,jdbcType=VARCHAR},
- </if>
- <if test="tel!=null">
- tel_=#{tel,jdbcType=VARCHAR},
- </if>
- <if test="status!=null">
- status_=#{status,jdbcType=VARCHAR},
- </if>
- <if test="approveStatus!=null">
- approve_status=#{approveStatus,jdbcType=VARCHAR},
- </if>
- <if test="readingTimes!=null">
- reading_times=#{readingTimes,jdbcType= NUMERIC },
- </if>
- <if test="collectionTimes!=null">
- collection_times=#{collectionTimes,jdbcType= NUMERIC },
- </if>
- <if test="deliveryTimes!=null">
- delivery_times=#{deliveryTimes,jdbcType= NUMERIC },
- </if>
- <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="workCategoryId!=null">
- work_category_id=#{workCategoryId,jdbcType= VARCHAR },
- </if>
- <if test="welfare!=null">
- welfare_=#{welfare,jdbcType= VARCHAR },
- </if>
- </set>
- where id_=#{id}
- </update>
- <select id="get" parameterType="string" resultMap="RecruitmentMap">
- select * from job_recruitment where id_=#{0}
- </select>
- <select id="exist" parameterType="string" resultType="int">
- select count(*) from job_recruitment where id_=#{0}
- </select>
- <select id="list" resultMap="RecruitmentMap">
- select * from job_recruitment
- </select>
- <select id="search" parameterType="hashmap" resultMap="RecruitmentMap">
- <![CDATA[
- select * from job_recruitment
- ]]>
- <where>
- del_flag = false
- <if test="searchParams.companyId != null">
- and company_id = #{searchParams.companyId}
- </if>
- <if test="searchParams.area != null">
- and area_ = #{searchParams.area}
- </if>
- <if test="searchParams.position != null">
- and position_ = #{searchParams.position}
- </if>
- <if test="searchParams.status != null">
- and status_ = #{searchParams.status}
- </if>
- <if test="searchParams.approveStatus != null">
- and approve_status = #{searchParams.approveStatus}
- </if>
- <if test="searchParams.position != null">
- and position_ = #{searchParams.position}
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
- <select id="foundPageList" parameterType="hashmap" resultType="map">
- <![CDATA[
- SELECT
- jr.id_ AS id,
- jr.title_ AS title,
- jr.address_ AS address,
- jr.requirements_ AS requirements,
- bc.logo_ AS logo,
- bc.name_ AS name,
- sdda.name_ AS scaleName,
- sddb.name_ AS wageTypeN,
- bci.city_name AS cityName,
- sddc.name_ AS industry,
- sddd.name_ AS workYear
- FROM
- job_recruitment AS jr
- LEFT JOIN base_company AS bc ON jr.company_id = bc.id_
- LEFT JOIN sys_data_dictionary AS sdda ON bc.scale_ = sdda.id_
- LEFT JOIN sys_data_dictionary AS sddb ON jr.wage_type = sddb.id_
- LEFT JOIN sys_data_dictionary AS sddc ON bc.industry_ = sddc.id_
- LEFT JOIN base_city AS bci ON jr.area_ = bci.id_
- ]]>
- <where>
- <if test="searchParams.title != null">
- and jr.title_ like #{searchParams.title}
- </if>
- <if test="searchParams.monthlySalary != null">
- and jr.wage_type like #{searchParams.monthlySalary}
- </if>
- <if test="searchParams.workExperience != null">
- and jr.work_year like #{searchParams.workExperience}
- </if>
- <if test="searchParams.education != null">
- and jr.education_ like #{searchParams.education}
- </if>
- <if test="searchParams.recruitmentPosition != null">
- and jr.position_ like #{searchParams.recruitmentPosition}
- </if>
- <if test="searchParams.relevantTitle != null">
- and jr.title_ like #{searchParams.relevantTitle}
- </if>
- <if test="searchParams.notrelevantId != null">
- and jr.id_ != #{searchParams.notrelevantId}
- </if>
- <if test="searchParams.status != null">
- and jr.status_ = #{searchParams.status}
- </if>
- <if test="searchParams.approveStatus != null">
- and jr.approve_status = #{searchParams.approveStatus}
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
- <!--招聘方职位管理-->
- <select id="loadForRecruiter" parameterType="hashMap" resultType="Map">
- <![CDATA[
- SELECT * FROM (
- SELECT
- jr.del_flag,
- jr.create_by,
- jr.id_ recruitmentId,
- DATE_FORMAT(jr.update_time,'%c月%e日 %H:%i') updateTime,
- jr.status_ status,
- jr.approve_status approveStatus,
- jr.title_ title,
- jwc.name_ position_name,
- waged.name_ wageTypeName,
- educationd.name_ educationName,
- workyeard.name_ workYear
- FROM
- job_recruitment jr
- INNER JOIN job_work_category jwc ON jr.position_ = jwc.id_ and jwc.del_flag=0
- left join sys_data_dictionary waged on jr.wage_type=waged.id_ and waged.del_flag=0
- left join sys_data_dictionary workyeard on jr.work_year=workyeard.id_ and workyeard.del_flag=0
- left join sys_data_dictionary educationd on jr.education_=educationd.id_ and educationd.del_flag=0
- ) TAB
- ]]>
- <where>
- <if test="1==1">
- and del_flag=0
- </if>
- <if test="searchParams.recruiter != null"> <!--按创建人(招聘人)过滤-->
- and create_by=#{searchParams.recruiter}
- </if>
- <if test='searchParams.status =="publish"'> <!--按招聘状态过滤publish:已发布且审核完;approve:审核中;close:关闭下架-->
- and status='1' and approveStatus='3' <!--sys_data_dictionary where parent_id='163b92e3-9847-4370-a31e-6d62bed279e8' -->
- </if>
- <if test='searchParams.status =="approve"'>
- and status='1' and approveStatus='2'
- </if>
- <if test='searchParams.status =="close"'>
- and status='0'
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
- <!--招聘方个人中心主页:统计已发布的招聘,被浏览量(不包含已撤销的(已关闭的))-->
- <select id="rptMyRecruitmentCount" parameterType="String" resultType="Map">
- select count(1) jobCount,sum(reading_times) readTimes from job_recruitment where create_by=#{0} and status_='1'
- </select>
- <!--招聘方职位管理 上下架管理-->
- <update id="updateForPublish">
- update job_recruitment set status_=#{publishTag},update_time=now(),update_by=#{caller} where id_=#{recruitmentId}
- </update>
- </mapper>
|