Resume.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <!-- namespace必须指向DAO接口 -->
  5. <mapper namespace="com.jpsoft.employment.modules.job.dao.ResumeDAO">
  6. <resultMap id="ResumeMap" type="com.jpsoft.employment.modules.job.entity.Resume">
  7. <id property="id" column="id_" />
  8. <result property="createBy" column="create_by" />
  9. <result property="createTime" column="create_time" />
  10. <result property="updateBy" column="update_by" />
  11. <result property="updateTime" column="update_time" />
  12. <result property="delFlag" column="del_flag" />
  13. <result property="jobUserId" column="job_user_id" />
  14. <result property="sex" column="sex_" />
  15. <result property="positionCategoryId" column="position_category_id" />
  16. <result property="workExp" column="work_exp" />
  17. <result property="education" column="education_" />
  18. <result property="dreamMoney" column="dream_money" />
  19. <result property="dreamAdd" column="dream_add" />
  20. <result property="birthday" column="birthday_" />
  21. <result property="introduction" column="introduction_" />
  22. <result property="status" column="status_" />
  23. <result property="approveStatus" column="approve_status" />
  24. <result property="jobStatus" column="job_status" />
  25. <result property="resumeUrls" column="resume_urls" />
  26. <result property="readingTimes" column="reading_times" />
  27. <result property="collectionTimes" column="collection_times" />
  28. <!--外联字段-->
  29. <result property="userPhoto" column="head_image_url" />
  30. <result property="userName" column="real_name" />
  31. <result property="userIsAuthentication" column="is_authentication" />
  32. <result property="userIdCard" column="id_card" />
  33. <result property="userAddress" column="address_" />
  34. <result property="userTel" column="tel_" />
  35. </resultMap>
  36. <insert id="insert" parameterType="com.jpsoft.employment.modules.job.entity.Resume">
  37. <!--
  38. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  39. select sys_guid() from dual
  40. </selectKey>
  41. -->
  42. <![CDATA[
  43. insert into job_resume
  44. (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,
  45. job_status,resume_urls,reading_times,collection_times)
  46. values
  47. (
  48. #{id,jdbcType=VARCHAR}
  49. ,#{createBy,jdbcType=VARCHAR}
  50. ,#{createTime,jdbcType= TIMESTAMP }
  51. ,#{updateBy,jdbcType=VARCHAR}
  52. ,#{updateTime,jdbcType= TIMESTAMP }
  53. ,#{delFlag,jdbcType= NUMERIC }
  54. ,#{jobUserId,jdbcType=VARCHAR}
  55. ,#{sex,jdbcType=VARCHAR}
  56. ,#{positionCategoryId,jdbcType=VARCHAR}
  57. ,#{workExp,jdbcType=VARCHAR}
  58. ,#{education,jdbcType=VARCHAR}
  59. ,#{dreamMoney,jdbcType=VARCHAR}
  60. ,#{dreamAdd,jdbcType=VARCHAR}
  61. ,#{birthday,jdbcType= TIMESTAMP }
  62. ,#{introduction,jdbcType=VARCHAR}
  63. ,#{status,jdbcType=VARCHAR}
  64. ,#{approveStatus,jdbcType=VARCHAR}
  65. ,#{jobStatus,jdbcType=VARCHAR}
  66. ,#{resumeUrls,jdbcType=VARCHAR}
  67. ,#{readingTimes,jdbcType= NUMERIC }
  68. ,#{collectionTimes,jdbcType= NUMERIC }
  69. )
  70. ]]>
  71. </insert>
  72. <delete id="delete" parameterType="string">
  73. delete from job_resume where id_=#{id,jdbcType=VARCHAR}
  74. </delete>
  75. <update id="update" parameterType="com.jpsoft.employment.modules.job.entity.Resume">
  76. update job_resume
  77. <set>
  78. <if test="createBy!=null">
  79. create_by=#{createBy,jdbcType=VARCHAR},
  80. </if>
  81. <if test="createTime!=null">
  82. create_time=#{createTime,jdbcType= TIMESTAMP },
  83. </if>
  84. <if test="updateBy!=null">
  85. update_by=#{updateBy,jdbcType=VARCHAR},
  86. </if>
  87. <if test="updateTime!=null">
  88. update_time=#{updateTime,jdbcType= TIMESTAMP },
  89. </if>
  90. <if test="delFlag!=null">
  91. del_flag=#{delFlag,jdbcType= NUMERIC },
  92. </if>
  93. <if test="jobUserId!=null">
  94. job_user_id=#{jobUserId,jdbcType=VARCHAR},
  95. </if>
  96. <if test="sex!=null">
  97. sex_=#{sex,jdbcType=VARCHAR},
  98. </if>
  99. <if test="positionCategoryId!=null">
  100. position_category_id=#{positionCategoryId,jdbcType=VARCHAR},
  101. </if>
  102. <if test="workExp!=null">
  103. work_exp=#{workExp,jdbcType=VARCHAR},
  104. </if>
  105. <if test="education!=null">
  106. education_=#{education,jdbcType=VARCHAR},
  107. </if>
  108. <if test="dreamMoney!=null">
  109. dream_money=#{dreamMoney,jdbcType=VARCHAR},
  110. </if>
  111. <if test="dreamAdd!=null">
  112. dream_add=#{dreamAdd,jdbcType=VARCHAR},
  113. </if>
  114. <if test="birthday!=null">
  115. birthday_=#{birthday,jdbcType= TIMESTAMP },
  116. </if>
  117. <if test="introduction!=null">
  118. introduction_=#{introduction,jdbcType=VARCHAR},
  119. </if>
  120. <if test="status!=null">
  121. status_=#{status,jdbcType=VARCHAR},
  122. </if>
  123. <if test="approveStatus!=null">
  124. approve_status=#{approveStatus,jdbcType=VARCHAR},
  125. </if>
  126. <if test="jobStatus!=null">
  127. job_status=#{jobStatus,jdbcType=VARCHAR},
  128. </if>
  129. <if test="resumeUrls!=null">
  130. resume_urls=#{resumeUrls,jdbcType=VARCHAR},
  131. </if>
  132. <if test="readingTimes!=null">
  133. reading_times=#{readingTimes,jdbcType= NUMERIC },
  134. </if>
  135. <if test="collectionTimes!=null">
  136. collection_times=#{collectionTimes,jdbcType= NUMERIC },
  137. </if>
  138. </set>
  139. where id_=#{id}
  140. </update>
  141. <select id="get" parameterType="string" resultMap="ResumeMap">
  142. SELECT a.*,b.head_image_url,b.real_name,b.is_authentication,b.id_card,b.address_,b.tel_ FROM job_resume a
  143. LEFT JOIN job_jobuser b ON a.job_user_id = b.id_ where a.del_flag = 0 AND a.id_ = #{0}
  144. </select>
  145. <select id="exist" parameterType="string" resultType="int">
  146. select count(*) from job_resume where id_=#{0}
  147. </select>
  148. <select id="list" resultMap="ResumeMap">
  149. select * from job_resume
  150. </select>
  151. <select id="search" parameterType="hashmap" resultMap="ResumeMap">
  152. <![CDATA[
  153. SELECT a.*,b.head_image_url,b.real_name,b.is_authentication FROM job_resume a
  154. LEFT JOIN job_jobuser b ON a.job_user_id = b.id_
  155. ]]>
  156. <where>
  157. a.del_flag = 0
  158. <if test="searchParams.positionCategoryId != null">
  159. and a.position_category_id = #{searchParams.positionCategoryId}
  160. </if>
  161. <if test="searchParams.approveStatus != null">
  162. and a.approve_status = #{searchParams.approveStatus}
  163. </if>
  164. <if test="searchParams.status != null">
  165. and a.status_ = #{searchParams.status}
  166. </if>
  167. <if test="searchParams.name != null">
  168. and b.real_name like #{searchParams.name}
  169. </if>
  170. </where>
  171. <foreach item="sort" collection="sortList" open="order by" separator=",">
  172. ${sort.name} ${sort.order}
  173. </foreach>
  174. </select>
  175. <select id="findByUserId" parameterType="string" resultMap="ResumeMap">
  176. select * from job_resume
  177. where
  178. job_user_id=#{0}
  179. and del_flag = 0
  180. limit 1
  181. </select>
  182. <!--用于移动端接口:招聘方【求职管理】-->
  183. <select id="foundJobManagement" parameterType="hashmap" resultType="map">
  184. <![CDATA[
  185. SELECT
  186. jr.title_ workName,
  187. sdda.name_ dreamMoney,
  188. sddb.name_ jobStatus,
  189. year(now())-year(jre.birthday_) age,
  190. sddd.name_ workExp,
  191. sdde.name_ education,
  192. jj.head_image_url headImage,
  193. jj.real_name name,
  194. jre.id_ resumeId,
  195. jre.sex_ sex,
  196. jre.dream_add dreamAdd,
  197. jre.approve_status approveStatus,
  198. su.id_ sysUserId
  199. FROM
  200. job_resume jre
  201. LEFT JOIN job_work_category jwc ON jre.position_category_id = jwc.id_
  202. LEFT JOIN sys_data_dictionary sdda ON jre.dream_money = sdda.id_
  203. LEFT JOIN sys_data_dictionary sddb ON jre.job_status = sddb.id_
  204. LEFT JOIN sys_data_dictionary sddd ON jre.work_exp = sddd.id_
  205. LEFT JOIN sys_data_dictionary sdde ON jre.education_ = sdde.id_
  206. LEFT JOIN job_jobuser jj ON jre.job_user_id = jj.id_
  207. LEFT JOIN job_resume_deliver jrd ON jre.id_ = jrd.job_resume_id
  208. LEFT JOIN job_recruitment jr ON jrd.job_recruitment_id = jr.id_
  209. INNER JOIN sys_user su ON jr.company_id = su.company_id
  210. ]]>
  211. <where>
  212. <if test="searchParams.id != null">
  213. and su.id_ = #{searchParams.id}
  214. </if>
  215. <if test="searchParams.type != null">
  216. and jre.approve_status = #{searchParams.type}
  217. </if>
  218. <if test="searchParams.sex != null">
  219. and jre.sex_ = #{searchParams.sex}
  220. </if>
  221. </where>
  222. <foreach item="sort" collection="sortList" open="order by" separator=",">
  223. ${sort.name} ${sort.order}
  224. </foreach>
  225. </select>
  226. </mapper>