ResumeWorkMapper.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.ssm.mapper.business.ResumeWorkMapper" >
  4. <resultMap id="BaseResultMap" type="com.ssm.model.business.ResumeWork" >
  5. <id column="WorkID" property="workid" jdbcType="INTEGER" />
  6. <result column="CompanyName" property="companyname" jdbcType="VARCHAR" />
  7. <result column="CompanyPosition" property="companyposition" jdbcType="VARCHAR" />
  8. <result column="LeaderName" property="leadername" jdbcType="VARCHAR" />
  9. <result column="LeaderMobile" property="leadermobile" jdbcType="VARCHAR" />
  10. <result column="IinductionStartDate" property="iinductionstartdate" jdbcType="TIMESTAMP" />
  11. <result column="IinductionEndDate" property="iinductionenddate" jdbcType="TIMESTAMP" />
  12. <result column="PostionName" property="postionname" jdbcType="VARCHAR" />
  13. <result column="WorkDetail" property="workdetail" jdbcType="VARCHAR" />
  14. <result column="ResumeID" property="resumeid" jdbcType="INTEGER" />
  15. <result column="OrderBy" property="orderby" jdbcType="INTEGER" />
  16. <result column="Reason" property="reason" jdbcType="VARCHAR" />
  17. </resultMap>
  18. <sql id="Base_Column_List" >
  19. WorkID, CompanyName, CompanyPosition, LeaderName, LeaderMobile, IinductionStartDate,
  20. IinductionEndDate, PostionName, WorkDetail, ResumeID, OrderBy, Reason
  21. </sql>
  22. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  23. select
  24. <include refid="Base_Column_List" />
  25. from ResumeWork
  26. where WorkID = #{workid,jdbcType=INTEGER}
  27. </select>
  28. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  29. delete from ResumeWork
  30. where WorkID = #{workid,jdbcType=INTEGER}
  31. </delete>
  32. <insert id="insert" parameterType="com.ssm.model.business.ResumeWork" >
  33. insert into ResumeWork (WorkID, CompanyName, CompanyPosition,
  34. LeaderName, LeaderMobile, IinductionStartDate,
  35. IinductionEndDate, PostionName, WorkDetail,
  36. ResumeID, OrderBy, Reason
  37. )
  38. values (#{workid,jdbcType=INTEGER}, #{companyname,jdbcType=VARCHAR}, #{companyposition,jdbcType=VARCHAR},
  39. #{leadername,jdbcType=VARCHAR}, #{leadermobile,jdbcType=VARCHAR}, #{iinductionstartdate,jdbcType=TIMESTAMP},
  40. #{iinductionenddate,jdbcType=TIMESTAMP}, #{postionname,jdbcType=VARCHAR}, #{workdetail,jdbcType=VARCHAR},
  41. #{resumeid,jdbcType=INTEGER}, #{orderby,jdbcType=INTEGER}, #{reason,jdbcType=VARCHAR}
  42. )
  43. </insert>
  44. <insert id="insertSelective" parameterType="com.ssm.model.business.ResumeWork" >
  45. insert into ResumeWork
  46. <trim prefix="(" suffix=")" suffixOverrides="," >
  47. <if test="workid != null" >
  48. WorkID,
  49. </if>
  50. <if test="companyname != null" >
  51. CompanyName,
  52. </if>
  53. <if test="companyposition != null" >
  54. CompanyPosition,
  55. </if>
  56. <if test="leadername != null" >
  57. LeaderName,
  58. </if>
  59. <if test="leadermobile != null" >
  60. LeaderMobile,
  61. </if>
  62. <if test="iinductionstartdate != null" >
  63. IinductionStartDate,
  64. </if>
  65. <if test="iinductionenddate != null" >
  66. IinductionEndDate,
  67. </if>
  68. <if test="postionname != null" >
  69. PostionName,
  70. </if>
  71. <if test="workdetail != null" >
  72. WorkDetail,
  73. </if>
  74. <if test="resumeid != null" >
  75. ResumeID,
  76. </if>
  77. <if test="orderby != null" >
  78. OrderBy,
  79. </if>
  80. <if test="reason != null" >
  81. Reason,
  82. </if>
  83. </trim>
  84. <trim prefix="values (" suffix=")" suffixOverrides="," >
  85. <if test="workid != null" >
  86. #{workid,jdbcType=INTEGER},
  87. </if>
  88. <if test="companyname != null" >
  89. #{companyname,jdbcType=VARCHAR},
  90. </if>
  91. <if test="companyposition != null" >
  92. #{companyposition,jdbcType=VARCHAR},
  93. </if>
  94. <if test="leadername != null" >
  95. #{leadername,jdbcType=VARCHAR},
  96. </if>
  97. <if test="leadermobile != null" >
  98. #{leadermobile,jdbcType=VARCHAR},
  99. </if>
  100. <if test="iinductionstartdate != null" >
  101. #{iinductionstartdate,jdbcType=TIMESTAMP},
  102. </if>
  103. <if test="iinductionenddate != null" >
  104. #{iinductionenddate,jdbcType=TIMESTAMP},
  105. </if>
  106. <if test="postionname != null" >
  107. #{postionname,jdbcType=VARCHAR},
  108. </if>
  109. <if test="workdetail != null" >
  110. #{workdetail,jdbcType=VARCHAR},
  111. </if>
  112. <if test="resumeid != null" >
  113. #{resumeid,jdbcType=INTEGER},
  114. </if>
  115. <if test="orderby != null" >
  116. #{orderby,jdbcType=INTEGER},
  117. </if>
  118. <if test="reason != null" >
  119. #{reason,jdbcType=VARCHAR},
  120. </if>
  121. </trim>
  122. ON DUPLICATE KEY UPDATE
  123. <trim suffixOverrides=",">
  124. <if test="companyname != null" >
  125. CompanyName = #{companyname,jdbcType=VARCHAR},
  126. </if>
  127. <if test="companyposition != null" >
  128. CompanyPosition = #{companyposition,jdbcType=VARCHAR},
  129. </if>
  130. <if test="leadername != null" >
  131. LeaderName = #{leadername,jdbcType=VARCHAR},
  132. </if>
  133. <if test="leadermobile != null" >
  134. LeaderMobile = #{leadermobile,jdbcType=VARCHAR},
  135. </if>
  136. <if test="iinductionstartdate != null" >
  137. IinductionStartDate = #{iinductionstartdate,jdbcType=TIMESTAMP},
  138. </if>
  139. <if test="iinductionenddate != null" >
  140. IinductionEndDate = #{iinductionenddate,jdbcType=TIMESTAMP},
  141. </if>
  142. <if test="postionname != null" >
  143. PostionName = #{postionname,jdbcType=VARCHAR},
  144. </if>
  145. <if test="workdetail != null" >
  146. WorkDetail = #{workdetail,jdbcType=VARCHAR},
  147. </if>
  148. <if test="orderby != null" >
  149. OrderBy = #{orderby,jdbcType=INTEGER},
  150. </if>
  151. <if test="reason != null" >
  152. Reason = #{reason,jdbcType=VARCHAR},
  153. </if>
  154. </trim>
  155. </insert>
  156. <update id="updateByPrimaryKeySelective" parameterType="com.ssm.model.business.ResumeWork" >
  157. update ResumeWork
  158. <set >
  159. <if test="companyname != null" >
  160. CompanyName = #{companyname,jdbcType=VARCHAR},
  161. </if>
  162. <if test="companyposition != null" >
  163. CompanyPosition = #{companyposition,jdbcType=VARCHAR},
  164. </if>
  165. <if test="leadername != null" >
  166. LeaderName = #{leadername,jdbcType=VARCHAR},
  167. </if>
  168. <if test="leadermobile != null" >
  169. LeaderMobile = #{leadermobile,jdbcType=VARCHAR},
  170. </if>
  171. <if test="iinductionstartdate != null" >
  172. IinductionStartDate = #{iinductionstartdate,jdbcType=TIMESTAMP},
  173. </if>
  174. <if test="iinductionenddate != null" >
  175. IinductionEndDate = #{iinductionenddate,jdbcType=TIMESTAMP},
  176. </if>
  177. <if test="postionname != null" >
  178. PostionName = #{postionname,jdbcType=VARCHAR},
  179. </if>
  180. <if test="workdetail != null" >
  181. WorkDetail = #{workdetail,jdbcType=VARCHAR},
  182. </if>
  183. <if test="resumeid != null" >
  184. ResumeID = #{resumeid,jdbcType=INTEGER},
  185. </if>
  186. <if test="orderby != null" >
  187. OrderBy = #{orderby,jdbcType=INTEGER},
  188. </if>
  189. <if test="reason != null" >
  190. Reason = #{reason,jdbcType=VARCHAR},
  191. </if>
  192. </set>
  193. where WorkID = #{workid,jdbcType=INTEGER}
  194. </update>
  195. <update id="updateByPrimaryKey" parameterType="com.ssm.model.business.ResumeWork" >
  196. update ResumeWork
  197. set CompanyName = #{companyname,jdbcType=VARCHAR},
  198. CompanyPosition = #{companyposition,jdbcType=VARCHAR},
  199. LeaderName = #{leadername,jdbcType=VARCHAR},
  200. LeaderMobile = #{leadermobile,jdbcType=VARCHAR},
  201. IinductionStartDate = #{iinductionstartdate,jdbcType=TIMESTAMP},
  202. IinductionEndDate = #{iinductionenddate,jdbcType=TIMESTAMP},
  203. PostionName = #{postionname,jdbcType=VARCHAR},
  204. WorkDetail = #{workdetail,jdbcType=VARCHAR},
  205. ResumeID = #{resumeid,jdbcType=INTEGER},
  206. OrderBy = #{orderby,jdbcType=INTEGER},
  207. Reason = #{reason,jdbcType=VARCHAR}
  208. where WorkID = #{workid,jdbcType=INTEGER}
  209. </update>
  210. <select id="selectWorkListByResumeId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  211. SELECT * from ResumeWork s where s.ResumeID=#{resumeId} ORDER BY s.OrderBy ASC
  212. </select>
  213. </mapper>