UserCareerMapper.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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.goafanti.common.dao.UserCareerMapper" >
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.UserCareer" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="uid" property="uid" jdbcType="VARCHAR" />
  7. <result column="engaged_field" property="engagedField" jdbcType="VARCHAR" />
  8. <result column="working_age" property="workingAge" jdbcType="VARCHAR" />
  9. <result column="professional_title" property="professionalTitle" jdbcType="VARCHAR" />
  10. <result column="professional_title_gettime" property="professionalTitleGettime" jdbcType="VARCHAR" />
  11. <result column="professional_certificate_url" property="professionalCertificateUrl" jdbcType="VARCHAR" />
  12. <result column="qualification" property="qualification" jdbcType="VARCHAR" />
  13. <result column="qualification_gettime" property="qualificationGettime" jdbcType="VARCHAR" />
  14. <result column="qualification_certificate_url" property="qualificationCertificateUrl" jdbcType="VARCHAR" />
  15. <result column="work_unit" property="workUnit" jdbcType="VARCHAR" />
  16. <result column="position" property="position" jdbcType="VARCHAR" />
  17. <result column="experiences" property="experiences" jdbcType="VARCHAR" />
  18. <result column="achievement" property="achievement" jdbcType="VARCHAR" />
  19. </resultMap>
  20. <sql id="Base_Column_List" >
  21. id, uid, engaged_field, working_age, professional_title, professional_title_gettime,
  22. professional_certificate_url, qualification, qualification_gettime, qualification_certificate_url,
  23. work_unit, position, experiences, achievement
  24. </sql>
  25. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  26. select
  27. <include refid="Base_Column_List" />
  28. from user_career
  29. where id = #{id,jdbcType=VARCHAR}
  30. </select>
  31. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  32. delete from user_career
  33. where id = #{id,jdbcType=VARCHAR}
  34. </delete>
  35. <insert id="insert" parameterType="com.goafanti.common.model.UserCareer" >
  36. insert into user_career (id, uid, engaged_field,
  37. working_age, professional_title, professional_title_gettime,
  38. professional_certificate_url, qualification,
  39. qualification_gettime, qualification_certificate_url,
  40. work_unit, position, experiences,
  41. achievement)
  42. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{engagedField,jdbcType=VARCHAR},
  43. #{workingAge,jdbcType=VARCHAR}, #{professionalTitle,jdbcType=VARCHAR}, #{professionalTitleGettime,jdbcType=VARCHAR},
  44. #{professionalCertificateUrl,jdbcType=VARCHAR}, #{qualification,jdbcType=VARCHAR},
  45. #{qualificationGettime,jdbcType=VARCHAR}, #{qualificationCertificateUrl,jdbcType=VARCHAR},
  46. #{workUnit,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{experiences,jdbcType=VARCHAR},
  47. #{achievement,jdbcType=VARCHAR})
  48. </insert>
  49. <insert id="insertSelective" parameterType="com.goafanti.common.model.UserCareer" >
  50. insert into user_career
  51. <trim prefix="(" suffix=")" suffixOverrides="," >
  52. <if test="id != null" >
  53. id,
  54. </if>
  55. <if test="uid != null" >
  56. uid,
  57. </if>
  58. <if test="engagedField != null" >
  59. engaged_field,
  60. </if>
  61. <if test="workingAge != null" >
  62. working_age,
  63. </if>
  64. <if test="professionalTitle != null" >
  65. professional_title,
  66. </if>
  67. <if test="professionalTitleGettime != null" >
  68. professional_title_gettime,
  69. </if>
  70. <if test="professionalCertificateUrl != null" >
  71. professional_certificate_url,
  72. </if>
  73. <if test="qualification != null" >
  74. qualification,
  75. </if>
  76. <if test="qualificationGettime != null" >
  77. qualification_gettime,
  78. </if>
  79. <if test="qualificationCertificateUrl != null" >
  80. qualification_certificate_url,
  81. </if>
  82. <if test="workUnit != null" >
  83. work_unit,
  84. </if>
  85. <if test="position != null" >
  86. position,
  87. </if>
  88. <if test="experiences != null" >
  89. experiences,
  90. </if>
  91. <if test="achievement != null" >
  92. achievement,
  93. </if>
  94. </trim>
  95. <trim prefix="values (" suffix=")" suffixOverrides="," >
  96. <if test="id != null" >
  97. #{id,jdbcType=VARCHAR},
  98. </if>
  99. <if test="uid != null" >
  100. #{uid,jdbcType=VARCHAR},
  101. </if>
  102. <if test="engagedField != null" >
  103. #{engagedField,jdbcType=VARCHAR},
  104. </if>
  105. <if test="workingAge != null" >
  106. #{workingAge,jdbcType=VARCHAR},
  107. </if>
  108. <if test="professionalTitle != null" >
  109. #{professionalTitle,jdbcType=VARCHAR},
  110. </if>
  111. <if test="professionalTitleGettime != null" >
  112. #{professionalTitleGettime,jdbcType=VARCHAR},
  113. </if>
  114. <if test="professionalCertificateUrl != null" >
  115. #{professionalCertificateUrl,jdbcType=VARCHAR},
  116. </if>
  117. <if test="qualification != null" >
  118. #{qualification,jdbcType=VARCHAR},
  119. </if>
  120. <if test="qualificationGettime != null" >
  121. #{qualificationGettime,jdbcType=VARCHAR},
  122. </if>
  123. <if test="qualificationCertificateUrl != null" >
  124. #{qualificationCertificateUrl,jdbcType=VARCHAR},
  125. </if>
  126. <if test="workUnit != null" >
  127. #{workUnit,jdbcType=VARCHAR},
  128. </if>
  129. <if test="position != null" >
  130. #{position,jdbcType=VARCHAR},
  131. </if>
  132. <if test="experiences != null" >
  133. #{experiences,jdbcType=VARCHAR},
  134. </if>
  135. <if test="achievement != null" >
  136. #{achievement,jdbcType=VARCHAR},
  137. </if>
  138. </trim>
  139. </insert>
  140. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserCareer" >
  141. update user_career
  142. <set >
  143. <if test="uid != null" >
  144. uid = #{uid,jdbcType=VARCHAR},
  145. </if>
  146. <if test="engagedField != null" >
  147. engaged_field = #{engagedField,jdbcType=VARCHAR},
  148. </if>
  149. <if test="workingAge != null" >
  150. working_age = #{workingAge,jdbcType=VARCHAR},
  151. </if>
  152. <if test="professionalTitle != null" >
  153. professional_title = #{professionalTitle,jdbcType=VARCHAR},
  154. </if>
  155. <if test="professionalTitleGettime != null" >
  156. professional_title_gettime = #{professionalTitleGettime,jdbcType=VARCHAR},
  157. </if>
  158. <if test="professionalCertificateUrl != null" >
  159. professional_certificate_url = #{professionalCertificateUrl,jdbcType=VARCHAR},
  160. </if>
  161. <if test="qualification != null" >
  162. qualification = #{qualification,jdbcType=VARCHAR},
  163. </if>
  164. <if test="qualificationGettime != null" >
  165. qualification_gettime = #{qualificationGettime,jdbcType=VARCHAR},
  166. </if>
  167. <if test="qualificationCertificateUrl != null" >
  168. qualification_certificate_url = #{qualificationCertificateUrl,jdbcType=VARCHAR},
  169. </if>
  170. <if test="workUnit != null" >
  171. work_unit = #{workUnit,jdbcType=VARCHAR},
  172. </if>
  173. <if test="position != null" >
  174. position = #{position,jdbcType=VARCHAR},
  175. </if>
  176. <if test="experiences != null" >
  177. experiences = #{experiences,jdbcType=VARCHAR},
  178. </if>
  179. <if test="achievement != null" >
  180. achievement = #{achievement,jdbcType=VARCHAR},
  181. </if>
  182. </set>
  183. where id = #{id,jdbcType=VARCHAR}
  184. </update>
  185. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserCareer" >
  186. update user_career
  187. set uid = #{uid,jdbcType=VARCHAR},
  188. engaged_field = #{engagedField,jdbcType=VARCHAR},
  189. working_age = #{workingAge,jdbcType=VARCHAR},
  190. professional_title = #{professionalTitle,jdbcType=VARCHAR},
  191. professional_title_gettime = #{professionalTitleGettime,jdbcType=VARCHAR},
  192. professional_certificate_url = #{professionalCertificateUrl,jdbcType=VARCHAR},
  193. qualification = #{qualification,jdbcType=VARCHAR},
  194. qualification_gettime = #{qualificationGettime,jdbcType=VARCHAR},
  195. qualification_certificate_url = #{qualificationCertificateUrl,jdbcType=VARCHAR},
  196. work_unit = #{workUnit,jdbcType=VARCHAR},
  197. position = #{position,jdbcType=VARCHAR},
  198. experiences = #{experiences,jdbcType=VARCHAR},
  199. achievement = #{achievement,jdbcType=VARCHAR}
  200. where id = #{id,jdbcType=VARCHAR}
  201. </update>
  202. <select id="selectUserCareerByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
  203. select
  204. <include refid="Base_Column_List" />
  205. from user_career
  206. where uid = #{uid,jdbcType=VARCHAR}
  207. </select>
  208. </mapper>