UserEduMapper.xml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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.UserEduMapper" >
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.UserEdu" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="uid" property="uid" jdbcType="VARCHAR" />
  7. <result column="education" property="education" jdbcType="VARCHAR" />
  8. <result column="major_category" property="majorCategory" jdbcType="VARCHAR" />
  9. <result column="major_name" property="majorName" jdbcType="VARCHAR" />
  10. <result column="graduate_school" property="graduateSchool" jdbcType="VARCHAR" />
  11. <result column="graduation_time_year" property="graduationTimeYear" jdbcType="VARCHAR" />
  12. <result column="graduation_time_month" property="graduationTimeMonth" jdbcType="VARCHAR" />
  13. <result column="graduation_time_day" property="graduationTimeDay" jdbcType="VARCHAR" />
  14. <result column="diploma_url" property="diplomaUrl" jdbcType="VARCHAR" />
  15. <result column="diploma_code" property="diplomaCode" jdbcType="VARCHAR" />
  16. <result column="degree_diploma_url" property="degreeDiplomaUrl" jdbcType="VARCHAR" />
  17. <result column="degree_code" property="degreeCode" jdbcType="VARCHAR" />
  18. </resultMap>
  19. <sql id="Base_Column_List" >
  20. id, uid, education, major_category, major_name, graduate_school, graduation_time_year,
  21. graduation_time_month, graduation_time_day,
  22. diploma_url, diploma_code,
  23. degree_diploma_url, degree_code
  24. </sql>
  25. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  26. select
  27. <include refid="Base_Column_List" />
  28. from user_edu
  29. where id = #{id,jdbcType=VARCHAR}
  30. </select>
  31. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  32. delete from user_edu
  33. where id = #{id,jdbcType=VARCHAR}
  34. </delete>
  35. <insert id="insert" parameterType="com.goafanti.common.model.UserEdu" >
  36. insert into user_edu (id, uid, education,
  37. major_category, major_name, graduate_school, graduation_time_year, graduation_time_month, graduation_time_day,
  38. diploma_url, diploma_code, degree_diploma_url,
  39. degree_code)
  40. values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{education,jdbcType=VARCHAR},
  41. #{majorCategory,jdbcType=VARCHAR}, #{majorName,jdbcType=VARCHAR},
  42. #{graduateSchool,jdbcType=VARCHAR}, #{graduationTimeYear,jdbcType=VARCHAR},
  43. #{graduationTimeMonth,jdbcType=VARCHAR},#{graduationTimeDay,jdbcType=VARCHAR},
  44. #{diplomaUrl,jdbcType=VARCHAR}, #{diplomaCode,jdbcType=VARCHAR}, #{degreeDiplomaUrl,jdbcType=VARCHAR},
  45. #{degreeCode,jdbcType=VARCHAR})
  46. </insert>
  47. <insert id="insertSelective" parameterType="com.goafanti.common.model.UserEdu" >
  48. insert into user_edu
  49. <trim prefix="(" suffix=")" suffixOverrides="," >
  50. <if test="id != null" >
  51. id,
  52. </if>
  53. <if test="uid != null" >
  54. uid,
  55. </if>
  56. <if test="education != null" >
  57. education,
  58. </if>
  59. <if test="majorCategory != null" >
  60. major_category,
  61. </if>
  62. <if test="majorName != null" >
  63. major_name,
  64. </if>
  65. <if test="graduateSchool != null" >
  66. graduate_school,
  67. </if>
  68. <if test="graduationTimeYear != null" >
  69. graduation_time_year,
  70. </if>
  71. <if test="graduationTimeMonth != null" >
  72. graduation_time_Month,
  73. </if>
  74. <if test="graduationTimeDay != null" >
  75. graduation_time_day,
  76. </if>
  77. <if test="diplomaUrl != null" >
  78. diploma_url,
  79. </if>
  80. <if test="diplomaCode != null" >
  81. diploma_code,
  82. </if>
  83. <if test="degreeDiplomaUrl != null" >
  84. degree_diploma_url,
  85. </if>
  86. <if test="degreeCode != null" >
  87. degree_code,
  88. </if>
  89. </trim>
  90. <trim prefix="values (" suffix=")" suffixOverrides="," >
  91. <if test="id != null" >
  92. #{id,jdbcType=VARCHAR},
  93. </if>
  94. <if test="uid != null" >
  95. #{uid,jdbcType=VARCHAR},
  96. </if>
  97. <if test="education != null" >
  98. #{education,jdbcType=VARCHAR},
  99. </if>
  100. <if test="majorCategory != null" >
  101. #{majorCategory,jdbcType=VARCHAR},
  102. </if>
  103. <if test="majorName != null" >
  104. #{majorName,jdbcType=VARCHAR},
  105. </if>
  106. <if test="graduateSchool != null" >
  107. #{graduateSchool,jdbcType=VARCHAR},
  108. </if>
  109. <if test="graduationTimeYear != null" >
  110. #{graduationTimeYear,jdbcType=VARCHAR},
  111. </if>
  112. <if test="graduationTimeMonth != null" >
  113. #{graduationTimeMonth,jdbcType=VARCHAR},
  114. </if>
  115. <if test="graduationTimeDay != null" >
  116. #{graduationTimeDay,jdbcType=VARCHAR},
  117. </if>
  118. <if test="diplomaUrl != null" >
  119. #{diplomaUrl,jdbcType=VARCHAR},
  120. </if>
  121. <if test="diplomaCode != null" >
  122. #{diplomaCode,jdbcType=VARCHAR},
  123. </if>
  124. <if test="degreeDiplomaUrl != null" >
  125. #{degreeDiplomaUrl,jdbcType=VARCHAR},
  126. </if>
  127. <if test="degreeCode != null" >
  128. #{degreeCode,jdbcType=VARCHAR},
  129. </if>
  130. </trim>
  131. </insert>
  132. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserEdu" >
  133. update user_edu
  134. <set >
  135. <if test="uid != null" >
  136. uid = #{uid,jdbcType=VARCHAR},
  137. </if>
  138. <if test="education != null" >
  139. education = #{education,jdbcType=VARCHAR},
  140. </if>
  141. <if test="majorCategory != null" >
  142. major_Category = #{majorCategory,jdbcType=VARCHAR},
  143. </if>
  144. <if test="majorName != null" >
  145. major_name = #{majorName,jdbcType=VARCHAR},
  146. </if>
  147. <if test="graduateSchool != null" >
  148. graduate_school = #{graduateSchool,jdbcType=VARCHAR},
  149. </if>
  150. <if test="graduationTimeYear != null" >
  151. graduation_time_year = #{graduationTimeYear,jdbcType=VARCHAR},
  152. </if>
  153. <if test="graduationTimeMonth != null" >
  154. graduation_time_month = #{graduationTimeMonth,jdbcType=VARCHAR},
  155. </if>
  156. <if test="graduationTimeDay != null" >
  157. graduation_time_day = #{graduationTimeDay,jdbcType=VARCHAR},
  158. </if>
  159. <if test="diplomaUrl != null" >
  160. diploma_Url = #{diplomaUrl,jdbcType=VARCHAR},
  161. </if>
  162. <if test="diplomaCode != null" >
  163. diploma_code = #{diplomaCode,jdbcType=VARCHAR},
  164. </if>
  165. <if test="degreeDiplomaUrl != null" >
  166. degree_diploma_url = #{degreeDiplomaUrl,jdbcType=VARCHAR},
  167. </if>
  168. <if test="degreeCode != null" >
  169. degree_code = #{degreeCode,jdbcType=VARCHAR},
  170. </if>
  171. </set>
  172. where id = #{id,jdbcType=VARCHAR}
  173. </update>
  174. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserEdu" >
  175. update user_edu
  176. set uid = #{uid,jdbcType=VARCHAR},
  177. education = #{education,jdbcType=VARCHAR},
  178. major_category = #{majorCategory,jdbcType=VARCHAR},
  179. major_name = #{majorName,jdbcType=VARCHAR},
  180. graduate_school = #{graduateSchool,jdbcType=VARCHAR},
  181. graduation_time_year = #{graduationTimeYear,jdbcType=VARCHAR},
  182. graduation_time_month = #{graduationTimeMonth,jdbcType=VARCHAR},
  183. graduation_time_day = #{graduationTimeDay,jdbcType=VARCHAR},
  184. diploma_url = #{diplomaUrl,jdbcType=VARCHAR},
  185. diploma_code = #{diplomaCode,jdbcType=VARCHAR},
  186. degree_diploma_url = #{degreeDiplomaUrl,jdbcType=VARCHAR},
  187. degree_code = #{degreeCode,jdbcType=VARCHAR}
  188. where id = #{id,jdbcType=VARCHAR}
  189. </update>
  190. <select id="selectUserEduByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
  191. select
  192. <include refid="Base_Column_List" />
  193. from user_edu
  194. where uid = #{uid,jdbcType=VARCHAR}
  195. </select>
  196. </mapper>