JobInformationInfo.xml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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.base.dao.JobInformationInfoDAO">
  6. <resultMap id="JobInformationInfoMap" type="com.jpsoft.employment.modules.base.entity.JobInformationInfo">
  7. <id property="id" column="id_" />
  8. <result property="personId" column="person_id" />
  9. <result property="photo" column="photo_" />
  10. <result property="serviceDesc" column="service_desc" />
  11. <result property="intendedIndustries" column="Intended_industries" />
  12. <result property="intendedPosition" column="Intended_position" />
  13. <result property="hopeSalary" column="hope_salary" />
  14. <result property="method" column="method_" />
  15. <result property="workExperience" column="work_experience" />
  16. <result property="education" column="education_" />
  17. <result property="status" column="status_" />
  18. <result property="createBy" column="create_by" />
  19. <result property="createTime" column="create_time" />
  20. <result property="updateBy" column="update_by" />
  21. <result property="updateTime" column="update_time" />
  22. <result property="delFlag" column="del_flag" />
  23. <result property="browseNumber" column="browse_number" />
  24. <result property="address" column="address_" />
  25. </resultMap>
  26. <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.JobInformationInfo">
  27. <!--
  28. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  29. select sys_guid() from dual
  30. </selectKey>
  31. -->
  32. <![CDATA[
  33. insert into base_job_information_info
  34. (id_,person_id,photo_,service_desc,Intended_industries,Intended_position,
  35. hope_salary,method_,work_experience,education_,status_,create_by,create_time,
  36. update_by,update_time,del_flag,browse_number,address_)
  37. values
  38. (
  39. #{id,jdbcType=VARCHAR}
  40. ,#{personId,jdbcType=VARCHAR}
  41. ,#{photo,jdbcType=VARCHAR}
  42. ,#{serviceDesc,jdbcType=VARCHAR}
  43. ,#{intendedIndustries,jdbcType=VARCHAR}
  44. ,#{intendedPosition,jdbcType=VARCHAR}
  45. ,#{hopeSalary,jdbcType= NUMERIC }
  46. ,#{method,jdbcType=VARCHAR}
  47. ,#{workExperience,jdbcType= VARCHAR }
  48. ,#{education,jdbcType=VARCHAR}
  49. ,#{status,jdbcType=VARCHAR}
  50. ,#{createBy,jdbcType=VARCHAR}
  51. ,#{createTime,jdbcType= TIMESTAMP }
  52. ,#{updateBy,jdbcType=VARCHAR}
  53. ,#{updateTime,jdbcType= TIMESTAMP }
  54. ,#{delFlag,jdbcType= NUMERIC }
  55. ,#{browseNumber,jdbcType= NUMERIC }
  56. ,#{address,jdbcType=VARCHAR}
  57. )
  58. ]]>
  59. </insert>
  60. <delete id="delete" parameterType="string">
  61. delete from base_job_information_info where id_=#{id,jdbcType=VARCHAR}
  62. </delete>
  63. <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.JobInformationInfo">
  64. update base_job_information_info
  65. <set>
  66. <if test="personId!=null">
  67. person_id=#{personId,jdbcType=VARCHAR},
  68. </if>
  69. <if test="photo!=null">
  70. photo_=#{photo,jdbcType=VARCHAR},
  71. </if>
  72. <if test="serviceDesc!=null">
  73. service_desc=#{serviceDesc,jdbcType=VARCHAR},
  74. </if>
  75. <if test="intendedIndustries!=null">
  76. Intended_industries=#{intendedIndustries,jdbcType=VARCHAR},
  77. </if>
  78. <if test="intendedPosition!=null">
  79. Intended_position=#{intendedPosition,jdbcType=VARCHAR},
  80. </if>
  81. <if test="hopeSalary!=null">
  82. hope_salary=#{hopeSalary,jdbcType= NUMERIC },
  83. </if>
  84. <if test="method!=null">
  85. method_=#{method,jdbcType=VARCHAR},
  86. </if>
  87. <if test="workExperience!=null">
  88. work_experience=#{workExperience,jdbcType= VARCHAR },
  89. </if>
  90. <if test="education!=null">
  91. education_=#{education,jdbcType=VARCHAR},
  92. </if>
  93. <if test="status!=null">
  94. status_=#{status,jdbcType=VARCHAR},
  95. </if>
  96. <if test="createBy!=null">
  97. create_by=#{createBy,jdbcType=VARCHAR},
  98. </if>
  99. <if test="createTime!=null">
  100. create_time=#{createTime,jdbcType= TIMESTAMP },
  101. </if>
  102. <if test="updateBy!=null">
  103. update_by=#{updateBy,jdbcType=VARCHAR},
  104. </if>
  105. <if test="updateTime!=null">
  106. update_time=#{updateTime,jdbcType= TIMESTAMP },
  107. </if>
  108. <if test="delFlag!=null">
  109. del_flag=#{delFlag,jdbcType= NUMERIC },
  110. </if>
  111. <if test="browseNumber!=null">
  112. browse_number=#{browseNumber,jdbcType= NUMERIC },
  113. </if>
  114. <if test="address!=null">
  115. address_=#{address,jdbcType=VARCHAR},
  116. </if>
  117. </set>
  118. where id_=#{id}
  119. </update>
  120. <select id="get" parameterType="string" resultMap="JobInformationInfoMap">
  121. select * from base_job_information_info where id_=#{0}
  122. </select>
  123. <select id="exist" parameterType="string" resultType="int">
  124. select count(*) from base_job_information_info where id_=#{0}
  125. </select>
  126. <select id="list" resultMap="JobInformationInfoMap">
  127. select * from base_job_information_info
  128. </select>
  129. <select id="search" parameterType="hashmap" resultMap="JobInformationInfoMap">
  130. <![CDATA[
  131. select * from base_job_information_info
  132. ]]>
  133. <where>
  134. del_flag=false
  135. <if test="searchParams.name != null">
  136. and name_ like #{searchParams.name}
  137. </if>
  138. <if test="searchParams.intendedPosition != null">
  139. and Intended_position like #{searchParams.intendedPosition}
  140. </if>
  141. <if test="searchParams.intendedIndustries != null">
  142. and Intended_industries = #{searchParams.intendedIndustries}
  143. </if>
  144. <if test="searchParams.method != null">
  145. and method_ = #{searchParams.method}
  146. </if>
  147. <if test="searchParams.workExperience != null">
  148. and work_experience = #{searchParams.workExperience}
  149. </if>
  150. <if test="searchParams.education != null">
  151. and education_ = #{searchParams.education}
  152. </if>
  153. <if test="searchParams.status != null">
  154. and status_ = #{searchParams.status}
  155. </if>
  156. </where>
  157. <foreach item="sort" collection="sortList" open="order by" separator=",">
  158. ${sort.name} ${sort.order}
  159. </foreach>
  160. </select>
  161. <select id="searchMobile" parameterType="hashmap" resultMap="JobInformationInfoMap">
  162. <![CDATA[
  163. SELECT
  164. a.*
  165. FROM
  166. base_job_information_info a
  167. ]]>
  168. <where>
  169. a.del_flag=false
  170. <if test="searchParams.serviceDesc != null">
  171. and a.service_desc like #{searchParams.serviceDesc}
  172. </if>
  173. <if test="searchParams.content != null">
  174. and ( a.service_desc like #{searchParams.content} or a.Intended_position like #{searchParams.content})
  175. </if>
  176. <if test="searchParams.method != null">
  177. and a.method_ = #{searchParams.method}
  178. </if>
  179. <if test="searchParams.workExp != null">
  180. and a.work_experience like #{searchParams.workExp}
  181. </if>
  182. <if test="searchParams.salaryStart != null">
  183. <![CDATA[
  184. and a.hope_salary >= #{searchParams.salaryStart}
  185. ]]>
  186. </if>
  187. <if test="searchParams.salaryEnd != null">
  188. <![CDATA[
  189. and a.hope_salary <= #{searchParams.salaryEnd}
  190. ]]>
  191. </if>
  192. <if test="searchParams.ids != null">
  193. <foreach item="id" collection="searchParams.ids" open="and id_ in (" separator="," close=")">
  194. #{id}
  195. </foreach>
  196. </if>
  197. </where>
  198. <foreach item="sort" collection="sortList" open="order by" separator=",">
  199. ${sort.name} ${sort.order}
  200. </foreach>
  201. </select>
  202. <select id="findByPersonId" resultMap="JobInformationInfoMap">
  203. SELECT
  204. *
  205. FROM
  206. base_job_information_info
  207. WHERE
  208. del_flag = 0
  209. and person_id = #{personId}
  210. limit 1
  211. </select>
  212. </mapper>