Resume.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. </resultMap>
  26. <insert id="insert" parameterType="com.jpsoft.employment.modules.job.entity.Resume">
  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 job_resume
  34. (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,
  35. job_status)
  36. values
  37. (
  38. #{id,jdbcType=VARCHAR}
  39. ,#{createBy,jdbcType=VARCHAR}
  40. ,#{createTime,jdbcType= TIMESTAMP }
  41. ,#{updateBy,jdbcType=VARCHAR}
  42. ,#{updateTime,jdbcType= TIMESTAMP }
  43. ,#{delFlag,jdbcType= NUMERIC }
  44. ,#{jobUserId,jdbcType=VARCHAR}
  45. ,#{sex,jdbcType=VARCHAR}
  46. ,#{positionCategoryId,jdbcType=VARCHAR}
  47. ,#{workExp,jdbcType=VARCHAR}
  48. ,#{education,jdbcType=VARCHAR}
  49. ,#{dreamMoney,jdbcType=VARCHAR}
  50. ,#{dreamAdd,jdbcType=VARCHAR}
  51. ,#{birthday,jdbcType= TIMESTAMP }
  52. ,#{introduction,jdbcType=VARCHAR}
  53. ,#{status,jdbcType=VARCHAR}
  54. ,#{approveStatus,jdbcType=VARCHAR}
  55. ,#{jobStatus,jdbcType=VARCHAR}
  56. )
  57. ]]>
  58. </insert>
  59. <delete id="delete" parameterType="string">
  60. delete from job_resume where id_=#{id,jdbcType=VARCHAR}
  61. </delete>
  62. <update id="update" parameterType="com.jpsoft.employment.modules.job.entity.Resume">
  63. update job_resume
  64. <set>
  65. <if test="createBy!=null">
  66. create_by=#{createBy,jdbcType=VARCHAR},
  67. </if>
  68. <if test="createTime!=null">
  69. create_time=#{createTime,jdbcType= TIMESTAMP },
  70. </if>
  71. <if test="updateBy!=null">
  72. update_by=#{updateBy,jdbcType=VARCHAR},
  73. </if>
  74. <if test="updateTime!=null">
  75. update_time=#{updateTime,jdbcType= TIMESTAMP },
  76. </if>
  77. <if test="delFlag!=null">
  78. del_flag=#{delFlag,jdbcType= NUMERIC },
  79. </if>
  80. <if test="jobUserId!=null">
  81. job_user_id=#{jobUserId,jdbcType=VARCHAR},
  82. </if>
  83. <if test="sex!=null">
  84. sex_=#{sex,jdbcType=VARCHAR},
  85. </if>
  86. <if test="positionCategoryId!=null">
  87. position_category_id=#{positionCategoryId,jdbcType=VARCHAR},
  88. </if>
  89. <if test="workExp!=null">
  90. work_exp=#{workExp,jdbcType=VARCHAR},
  91. </if>
  92. <if test="education!=null">
  93. education_=#{education,jdbcType=VARCHAR},
  94. </if>
  95. <if test="dreamMoney!=null">
  96. dream_money=#{dreamMoney,jdbcType=VARCHAR},
  97. </if>
  98. <if test="dreamAdd!=null">
  99. dream_add=#{dreamAdd,jdbcType=VARCHAR},
  100. </if>
  101. <if test="birthday!=null">
  102. birthday_=#{birthday,jdbcType= TIMESTAMP },
  103. </if>
  104. <if test="introduction!=null">
  105. introduction_=#{introduction,jdbcType=VARCHAR},
  106. </if>
  107. <if test="status!=null">
  108. status_=#{status,jdbcType=VARCHAR},
  109. </if>
  110. <if test="approveStatus!=null">
  111. approve_status=#{approveStatus,jdbcType=VARCHAR},
  112. </if>
  113. <if test="jobStatus!=null">
  114. job_status=#{jobStatus,jdbcType=VARCHAR},
  115. </if>
  116. </set>
  117. where id_=#{id}
  118. </update>
  119. <select id="get" parameterType="string" resultMap="ResumeMap">
  120. select * from job_resume where id_=#{0}
  121. </select>
  122. <select id="exist" parameterType="string" resultType="int">
  123. select count(*) from job_resume where id_=#{0}
  124. </select>
  125. <select id="list" resultMap="ResumeMap">
  126. select * from job_resume
  127. </select>
  128. <select id="search" parameterType="hashmap" resultMap="ResumeMap">
  129. <![CDATA[
  130. select * from job_resume
  131. ]]>
  132. <where>
  133. del_flag = 0
  134. <if test="searchParams.id != null">
  135. and ID_ like #{searchParams.id}
  136. </if>
  137. </where>
  138. <foreach item="sort" collection="sortList" open="order by" separator=",">
  139. ${sort.name} ${sort.order}
  140. </foreach>
  141. </select>
  142. <select id="findByUserId" parameterType="string" resultMap="ResumeMap">
  143. select * from job_resume
  144. where
  145. job_user_id=#{0}
  146. and del_flag = 0
  147. limit 1
  148. </select>
  149. </mapper>