Recruitment.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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
  165. id_,company_id,title_,area_,address_,position_,position_message,requirements_,wage_,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 from job_recruitment where id_=#{0}
  166. </select>
  167. <select id="exist" parameterType="string" resultType="int">
  168. select count(*) from job_recruitment where id_=#{0}
  169. </select>
  170. <select id="list" resultMap="RecruitmentMap">
  171. select * from job_recruitment
  172. </select>
  173. <select id="search" parameterType="hashmap" resultMap="RecruitmentMap">
  174. <![CDATA[
  175. select * from job_recruitment
  176. ]]>
  177. <where>
  178. <if test="searchParams.id != null">
  179. and ID_ like #{searchParams.id}
  180. </if>
  181. </where>
  182. <foreach item="sort" collection="sortList" open="order by" separator=",">
  183. ${sort.name} ${sort.order}
  184. </foreach>
  185. </select>
  186. </mapper>