| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- <?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.ResumeDAO">
- <resultMap id="ResumeMap" type="com.jpsoft.employment.modules.job.entity.Resume">
- <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="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" />
- <result property="jobStatus" column="job_status" />
- <result property="resumeUrls" column="resume_urls" />
- <result property="readingTimes" column="reading_times" />
- <result property="collectionTimes" column="collection_times" />
- <!--外联字段-->
- <result property="userPhoto" column="head_image_url" />
- <result property="userName" column="real_name" />
- <result property="userIsAuthentication" column="is_authentication" />
- <result property="userIdCard" column="id_card" />
- <result property="userAddress" column="address_" />
- <result property="userTel" column="tel_" />
- </resultMap>
- <insert id="insert" parameterType="com.jpsoft.employment.modules.job.entity.Resume">
- <!--
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
- select sys_guid() from dual
- </selectKey>
- -->
- <![CDATA[
- insert into job_resume
- (id_,create_by,create_time,update_by,update_time,del_flag,job_user_id,sex_,position_category_id,work_exp,education_,dream_money,dream_add,birthday_,introduction_,status_,approve_status,
- job_status,resume_urls,reading_times,collection_times)
- values
- (
- #{id,jdbcType=VARCHAR}
- ,#{createBy,jdbcType=VARCHAR}
- ,#{createTime,jdbcType= TIMESTAMP }
- ,#{updateBy,jdbcType=VARCHAR}
- ,#{updateTime,jdbcType= TIMESTAMP }
- ,#{delFlag,jdbcType= NUMERIC }
- ,#{jobUserId,jdbcType=VARCHAR}
- ,#{sex,jdbcType=VARCHAR}
- ,#{positionCategoryId,jdbcType=VARCHAR}
- ,#{workExp,jdbcType=VARCHAR}
- ,#{education,jdbcType=VARCHAR}
- ,#{dreamMoney,jdbcType=VARCHAR}
- ,#{dreamAdd,jdbcType=VARCHAR}
- ,#{birthday,jdbcType= TIMESTAMP }
- ,#{introduction,jdbcType=VARCHAR}
- ,#{status,jdbcType=VARCHAR}
- ,#{approveStatus,jdbcType=VARCHAR}
- ,#{jobStatus,jdbcType=VARCHAR}
- ,#{resumeUrls,jdbcType=VARCHAR}
- ,#{readingTimes,jdbcType= NUMERIC }
- ,#{collectionTimes,jdbcType= NUMERIC }
- )
- ]]>
- </insert>
- <delete id="delete" parameterType="string">
- delete from job_resume where id_=#{id,jdbcType=VARCHAR}
- </delete>
- <update id="update" parameterType="com.jpsoft.employment.modules.job.entity.Resume">
- update job_resume
- <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="jobUserId!=null">
- job_user_id=#{jobUserId,jdbcType=VARCHAR},
- </if>
- <if test="sex!=null">
- sex_=#{sex,jdbcType=VARCHAR},
- </if>
- <if test="positionCategoryId!=null">
- position_category_id=#{positionCategoryId,jdbcType=VARCHAR},
- </if>
- <if test="workExp!=null">
- work_exp=#{workExp,jdbcType=VARCHAR},
- </if>
- <if test="education!=null">
- education_=#{education,jdbcType=VARCHAR},
- </if>
- <if test="dreamMoney!=null">
- dream_money=#{dreamMoney,jdbcType=VARCHAR},
- </if>
- <if test="dreamAdd!=null">
- dream_add=#{dreamAdd,jdbcType=VARCHAR},
- </if>
- <if test="birthday!=null">
- birthday_=#{birthday,jdbcType= TIMESTAMP },
- </if>
- <if test="introduction!=null">
- introduction_=#{introduction,jdbcType=VARCHAR},
- </if>
- <if test="status!=null">
- status_=#{status,jdbcType=VARCHAR},
- </if>
- <if test="approveStatus!=null">
- approve_status=#{approveStatus,jdbcType=VARCHAR},
- </if>
- <if test="jobStatus!=null">
- job_status=#{jobStatus,jdbcType=VARCHAR},
- </if>
- <if test="resumeUrls!=null">
- resume_urls=#{resumeUrls,jdbcType=VARCHAR},
- </if>
- <if test="readingTimes!=null">
- reading_times=#{readingTimes,jdbcType= NUMERIC },
- </if>
- <if test="collectionTimes!=null">
- collection_times=#{collectionTimes,jdbcType= NUMERIC },
- </if>
- </set>
- where id_=#{id}
- </update>
- <select id="get" parameterType="string" resultMap="ResumeMap">
- SELECT a.*,b.head_image_url,b.real_name,b.is_authentication,b.id_card,b.address_,b.tel_ FROM job_resume a
- LEFT JOIN job_jobuser b ON a.job_user_id = b.id_ where a.del_flag = 0 AND a.id_ = #{0}
- </select>
- <select id="exist" parameterType="string" resultType="int">
- select count(*) from job_resume where id_=#{0}
- </select>
- <select id="list" resultMap="ResumeMap">
- select * from job_resume
- </select>
- <select id="search" parameterType="hashmap" resultMap="ResumeMap">
- <![CDATA[
- SELECT a.*,b.head_image_url,b.real_name,b.is_authentication FROM job_resume a
- LEFT JOIN job_jobuser b ON a.job_user_id = b.id_
- ]]>
- <where>
- a.del_flag = 0
- <if test="searchParams.positionCategoryId != null">
- and a.position_category_id = #{searchParams.positionCategoryId}
- </if>
- <if test="searchParams.approveStatus != null">
- and a.approve_status = #{searchParams.approveStatus}
- </if>
- <if test="searchParams.status != null">
- and a.status_ = #{searchParams.status}
- </if>
- <if test="searchParams.name != null">
- and b.real_name like #{searchParams.name}
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
- <select id="findByUserId" parameterType="string" resultMap="ResumeMap">
- select * from job_resume
- where
- job_user_id=#{0}
- and del_flag = 0
- limit 1
- </select>
- <!--用于移动端接口:招聘方【求职管理】-->
- <select id="foundJobManagement" parameterType="hashmap" resultType="map">
- <![CDATA[
- SELECT
- jr.title_ workName,
- sdda.name_ dreamMoney,
- sddb.name_ jobStatus,
- year(now())-year(jre.birthday_) age,
- sddd.name_ workExp,
- sdde.name_ education,
- jj.head_image_url headImage,
- jj.real_name name,
- jre.id_ resumeId,
- jre.sex_ sex,
- jre.dream_add dreamAdd,
- jre.approve_status approveStatus,
- su.id_ sysUserId
- FROM
- job_resume jre
- LEFT JOIN job_work_category jwc ON jre.position_category_id = jwc.id_
- LEFT JOIN sys_data_dictionary sdda ON jre.dream_money = sdda.id_
- LEFT JOIN sys_data_dictionary sddb ON jre.job_status = sddb.id_
- LEFT JOIN sys_data_dictionary sddd ON jre.work_exp = sddd.id_
- LEFT JOIN sys_data_dictionary sdde ON jre.education_ = sdde.id_
- LEFT JOIN job_jobuser jj ON jre.job_user_id = jj.id_
- LEFT JOIN job_resume_deliver jrd ON jre.id_ = jrd.job_resume_id
- LEFT JOIN job_recruitment jr ON jrd.job_recruitment_id = jr.id_
- INNER JOIN sys_user su ON jr.company_id = su.company_id
- ]]>
- <where>
- <if test="searchParams.id != null">
- and su.id_ = #{searchParams.id}
- </if>
- <if test="searchParams.type != null">
- and jre.approve_status = #{searchParams.type}
- </if>
- <if test="searchParams.sex != null">
- and jre.sex_ = #{searchParams.sex}
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
- </mapper>
|