Recruitment.xml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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.RecruitmentDAO">
  6. <resultMap id="RecruitmentMap" type="com.jpsoft.employment.modules.job.entity.Recruitment">
  7. <id property="id" column="id_" />
  8. <result property="companyId" column="company_id" />
  9. <result property="title" column="title_" />
  10. <result property="area" column="area_" />
  11. <result property="address" column="address_" />
  12. <result property="position" column="position_" />
  13. <result property="positionMessage" column="position_message" />
  14. <result property="requirements" column="requirements_" />
  15. <result property="positionNumber" column="position_number" />
  16. <result property="workYear" column="work_year" />
  17. <result property="education" column="education_" />
  18. <result property="positionSex" column="position_sex" />
  19. <result property="readTimes" column="read_times" />
  20. <result property="wageType" column="wage_type" />
  21. <result property="isDiscussPersonally" column="is_discuss_personally" />
  22. <result property="contactPerson" column="contact_person" />
  23. <result property="tel" column="tel_" />
  24. <result property="status" column="status_" />
  25. <result property="approveStatus" column="approve_status" />
  26. <result property="readingTimes" column="reading_times" />
  27. <result property="collectionTimes" column="collection_times" />
  28. <result property="deliveryTimes" column="delivery_times" />
  29. <result property="createBy" column="create_by" />
  30. <result property="createTime" column="create_time" />
  31. <result property="updateBy" column="update_by" />
  32. <result property="updateTime" column="update_time" />
  33. <result property="delFlag" column="del_flag" />
  34. </resultMap>
  35. <insert id="insert" parameterType="com.jpsoft.employment.modules.job.entity.Recruitment">
  36. <!--
  37. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  38. select sys_guid() from dual
  39. </selectKey>
  40. -->
  41. <![CDATA[
  42. insert into job_recruitment
  43. (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)
  44. values
  45. (
  46. #{id,jdbcType=VARCHAR}
  47. ,#{companyId,jdbcType=VARCHAR}
  48. ,#{title,jdbcType=VARCHAR}
  49. ,#{area,jdbcType=VARCHAR}
  50. ,#{address,jdbcType=VARCHAR}
  51. ,#{position,jdbcType=VARCHAR}
  52. ,#{positionMessage,jdbcType=VARCHAR}
  53. ,#{requirements,jdbcType=VARCHAR}
  54. ,#{positionNumber,jdbcType= NUMERIC }
  55. ,#{workYear,jdbcType=VARCHAR}
  56. ,#{education,jdbcType=VARCHAR}
  57. ,#{positionSex,jdbcType=VARCHAR}
  58. ,#{readTimes,jdbcType= NUMERIC }
  59. ,#{wageType,jdbcType=VARCHAR}
  60. ,#{isDiscussPersonally,jdbcType= NUMERIC }
  61. ,#{contactPerson,jdbcType=VARCHAR}
  62. ,#{tel,jdbcType=VARCHAR}
  63. ,#{status,jdbcType=VARCHAR}
  64. ,#{approveStatus,jdbcType=VARCHAR}
  65. ,#{readingTimes,jdbcType= NUMERIC }
  66. ,#{collectionTimes,jdbcType= NUMERIC }
  67. ,#{deliveryTimes,jdbcType= NUMERIC }
  68. ,#{createBy,jdbcType=VARCHAR}
  69. ,#{createTime,jdbcType= TIMESTAMP }
  70. ,#{updateBy,jdbcType=VARCHAR}
  71. ,#{updateTime,jdbcType= TIMESTAMP }
  72. ,#{delFlag,jdbcType= NUMERIC }
  73. )
  74. ]]>
  75. </insert>
  76. <delete id="delete" parameterType="string">
  77. delete from job_recruitment where id_=#{id,jdbcType=VARCHAR}
  78. </delete>
  79. <update id="update" parameterType="com.jpsoft.employment.modules.job.entity.Recruitment">
  80. update job_recruitment
  81. <set>
  82. <if test="companyId!=null">
  83. company_id=#{companyId,jdbcType=VARCHAR},
  84. </if>
  85. <if test="title!=null">
  86. title_=#{title,jdbcType=VARCHAR},
  87. </if>
  88. <if test="area!=null">
  89. area_=#{area,jdbcType=VARCHAR},
  90. </if>
  91. <if test="address!=null">
  92. address_=#{address,jdbcType=VARCHAR},
  93. </if>
  94. <if test="position!=null">
  95. position_=#{position,jdbcType=VARCHAR},
  96. </if>
  97. <if test="positionMessage!=null">
  98. position_message=#{positionMessage,jdbcType=VARCHAR},
  99. </if>
  100. <if test="requirements!=null">
  101. requirements_=#{requirements,jdbcType=VARCHAR},
  102. </if>
  103. <if test="positionNumber!=null">
  104. position_number=#{positionNumber,jdbcType= NUMERIC },
  105. </if>
  106. <if test="workYear!=null">
  107. work_year=#{workYear,jdbcType=VARCHAR},
  108. </if>
  109. <if test="education!=null">
  110. education_=#{education,jdbcType=VARCHAR},
  111. </if>
  112. <if test="positionSex!=null">
  113. position_sex=#{positionSex,jdbcType=VARCHAR},
  114. </if>
  115. <if test="readTimes!=null">
  116. read_times=#{readTimes,jdbcType= NUMERIC },
  117. </if>
  118. <if test="wageType!=null">
  119. wage_type=#{wageType,jdbcType=VARCHAR},
  120. </if>
  121. <if test="isDiscussPersonally!=null">
  122. is_discuss_personally=#{isDiscussPersonally,jdbcType= NUMERIC },
  123. </if>
  124. <if test="contactPerson!=null">
  125. contact_person=#{contactPerson,jdbcType=VARCHAR},
  126. </if>
  127. <if test="tel!=null">
  128. tel_=#{tel,jdbcType=VARCHAR},
  129. </if>
  130. <if test="status!=null">
  131. status_=#{status,jdbcType=VARCHAR},
  132. </if>
  133. <if test="approveStatus!=null">
  134. approve_status=#{approveStatus,jdbcType=VARCHAR},
  135. </if>
  136. <if test="readingTimes!=null">
  137. reading_times=#{readingTimes,jdbcType= NUMERIC },
  138. </if>
  139. <if test="collectionTimes!=null">
  140. collection_times=#{collectionTimes,jdbcType= NUMERIC },
  141. </if>
  142. <if test="deliveryTimes!=null">
  143. delivery_times=#{deliveryTimes,jdbcType= NUMERIC },
  144. </if>
  145. <if test="createBy!=null">
  146. create_by=#{createBy,jdbcType=VARCHAR},
  147. </if>
  148. <if test="createTime!=null">
  149. create_time=#{createTime,jdbcType= TIMESTAMP },
  150. </if>
  151. <if test="updateBy!=null">
  152. update_by=#{updateBy,jdbcType=VARCHAR},
  153. </if>
  154. <if test="updateTime!=null">
  155. update_time=#{updateTime,jdbcType= TIMESTAMP },
  156. </if>
  157. <if test="delFlag!=null">
  158. del_flag=#{delFlag,jdbcType= NUMERIC },
  159. </if>
  160. </set>
  161. where id_=#{id}
  162. </update>
  163. <select id="get" parameterType="string" resultMap="RecruitmentMap">
  164. select * from job_recruitment where id_=#{0}
  165. </select>
  166. <select id="exist" parameterType="string" resultType="int">
  167. select count(*) from job_recruitment where id_=#{0}
  168. </select>
  169. <select id="list" resultMap="RecruitmentMap">
  170. select * from job_recruitment
  171. </select>
  172. <select id="search" parameterType="hashmap" resultMap="RecruitmentMap">
  173. <![CDATA[
  174. select * from job_recruitment
  175. ]]>
  176. <where>
  177. del_flag = 0
  178. <if test="searchParams.id != null">
  179. and ID_ like #{searchParams.id}
  180. </if>
  181. <if test="searchParams.status != null">
  182. and status_ = #{searchParams.status}
  183. </if>
  184. <if test="searchParams.approveStatus != null">
  185. and approve_status = #{searchParams.approveStatus}
  186. </if>
  187. </where>
  188. <foreach item="sort" collection="sortList" open="order by" separator=",">
  189. ${sort.name} ${sort.order}
  190. </foreach>
  191. </select>
  192. <select id="foundPageList" parameterType="hashmap" resultType="map">
  193. <![CDATA[
  194. SELECT
  195. jr.id_ AS id,
  196. jr.title_ AS title,
  197. jr.is_discuss_personally AS isDiscussPersonally,
  198. jr.requirements_ AS requirements,
  199. jr.address_ AS address,
  200. bc.logo_ AS logo,
  201. bc.name_ AS name,
  202. sdd.name_ AS scaleName,
  203. bci.city_name AS cityName,
  204. jwc.name_ AS code
  205. FROM
  206. job_recruitment AS jr
  207. INNER JOIN base_company AS bc
  208. INNER JOIN sys_data_dictionary AS sdd
  209. INNER JOIN base_city AS bci
  210. INNER JOIN job_work_category AS jwc ON jr.company_id = bc.id_
  211. AND bc.scale_ = sdd.id_
  212. AND jr.area_ = bci.id_
  213. AND jr.position_ = jwc.id_
  214. ]]>
  215. <where>
  216. <if test="searchParams.id != null">
  217. and bc.id_ like #{searchParams.id}
  218. </if>
  219. <if test="searchParams.title != null">
  220. and jr.title_ like #{searchParams.title}
  221. </if>
  222. <if test="searchParams.monthlySalary != null">
  223. and jr.wage_type like #{searchParams.monthlySalary}
  224. </if>
  225. <if test="searchParams.workExperience != null">
  226. and jr.requirements_ like #{searchParams.workExperience}
  227. </if>
  228. <if test="searchParams.education != null">
  229. and jr.education_ like #{searchParams.education}
  230. </if>
  231. <if test="searchParams.recruitmentPosition != null">
  232. and jr.position_ like #{searchParams.recruitmentPosition}
  233. </if>
  234. <if test="searchParams.relevantTitle != null">
  235. and jr.title_ like #{searchParams.relevantTitle}
  236. </if>
  237. <if test="searchParams.notrelevantId != null">
  238. and jr.id_ != #{searchParams.notrelevantId}
  239. </if>
  240. <if test="searchParams.status != null">
  241. and jr.status_ = #{searchParams.status}
  242. </if>
  243. <if test="searchParams.approveStatus != null">
  244. and jr.approve_status = #{searchParams.approveStatus}
  245. </if>
  246. </where>
  247. <foreach item="sort" collection="sortList" open="order by" separator=",">
  248. ${sort.name} ${sort.order}
  249. </foreach>
  250. </select>
  251. </mapper>