UserMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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.hssx.mapper.UserMapper">
  4. <resultMap id="BaseResultMap" type="com.hssx.entity.User">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  9. -->
  10. <id column="id" jdbcType="VARCHAR" property="id" />
  11. <result column="type" jdbcType="INTEGER" property="type" />
  12. <result column="voucher_id" jdbcType="VARCHAR" property="voucherId" />
  13. <result column="indate" jdbcType="TIMESTAMP" property="indate" />
  14. <result column="header_pic" jdbcType="VARCHAR" property="headerPic" />
  15. <result column="nick_name" jdbcType="VARCHAR" property="nickName" />
  16. <result column="city" jdbcType="VARCHAR" property="city" />
  17. </resultMap>
  18. <sql id="Example_Where_Clause">
  19. <!--
  20. WARNING - @mbg.generated
  21. This element is automatically generated by MyBatis Generator, do not modify.
  22. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  23. -->
  24. <where>
  25. <foreach collection="oredCriteria" item="criteria" separator="or">
  26. <if test="criteria.valid">
  27. <trim prefix="(" prefixOverrides="and" suffix=")">
  28. <foreach collection="criteria.criteria" item="criterion">
  29. <choose>
  30. <when test="criterion.noValue">
  31. and ${criterion.condition}
  32. </when>
  33. <when test="criterion.singleValue">
  34. and ${criterion.condition} #{criterion.value}
  35. </when>
  36. <when test="criterion.betweenValue">
  37. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  38. </when>
  39. <when test="criterion.listValue">
  40. and ${criterion.condition}
  41. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  42. #{listItem}
  43. </foreach>
  44. </when>
  45. </choose>
  46. </foreach>
  47. </trim>
  48. </if>
  49. </foreach>
  50. </where>
  51. </sql>
  52. <sql id="Update_By_Example_Where_Clause">
  53. <!--
  54. WARNING - @mbg.generated
  55. This element is automatically generated by MyBatis Generator, do not modify.
  56. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  57. -->
  58. <where>
  59. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  60. <if test="criteria.valid">
  61. <trim prefix="(" prefixOverrides="and" suffix=")">
  62. <foreach collection="criteria.criteria" item="criterion">
  63. <choose>
  64. <when test="criterion.noValue">
  65. and ${criterion.condition}
  66. </when>
  67. <when test="criterion.singleValue">
  68. and ${criterion.condition} #{criterion.value}
  69. </when>
  70. <when test="criterion.betweenValue">
  71. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  72. </when>
  73. <when test="criterion.listValue">
  74. and ${criterion.condition}
  75. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  76. #{listItem}
  77. </foreach>
  78. </when>
  79. </choose>
  80. </foreach>
  81. </trim>
  82. </if>
  83. </foreach>
  84. </where>
  85. </sql>
  86. <sql id="Base_Column_List">
  87. <!--
  88. WARNING - @mbg.generated
  89. This element is automatically generated by MyBatis Generator, do not modify.
  90. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  91. -->
  92. id, type, voucher_id, indate, header_pic, nick_name, city
  93. </sql>
  94. <select id="selectByExample" parameterType="com.hssx.entity.UserExample" resultMap="BaseResultMap">
  95. <!--
  96. WARNING - @mbg.generated
  97. This element is automatically generated by MyBatis Generator, do not modify.
  98. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  99. -->
  100. select
  101. <if test="distinct">
  102. distinct
  103. </if>
  104. <include refid="Base_Column_List" />
  105. from mini_user
  106. <if test="_parameter != null">
  107. <include refid="Example_Where_Clause" />
  108. </if>
  109. <if test="orderByClause != null">
  110. order by ${orderByClause}
  111. </if>
  112. </select>
  113. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  114. <!--
  115. WARNING - @mbg.generated
  116. This element is automatically generated by MyBatis Generator, do not modify.
  117. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  118. -->
  119. select
  120. <include refid="Base_Column_List" />
  121. from mini_user
  122. where id = #{id,jdbcType=VARCHAR}
  123. </select>
  124. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  125. <!--
  126. WARNING - @mbg.generated
  127. This element is automatically generated by MyBatis Generator, do not modify.
  128. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  129. -->
  130. delete from mini_user
  131. where id = #{id,jdbcType=VARCHAR}
  132. </delete>
  133. <delete id="deleteByExample" parameterType="com.hssx.entity.UserExample">
  134. <!--
  135. WARNING - @mbg.generated
  136. This element is automatically generated by MyBatis Generator, do not modify.
  137. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  138. -->
  139. delete from mini_user
  140. <if test="_parameter != null">
  141. <include refid="Example_Where_Clause" />
  142. </if>
  143. </delete>
  144. <insert id="insert" parameterType="com.hssx.entity.User">
  145. <!--
  146. WARNING - @mbg.generated
  147. This element is automatically generated by MyBatis Generator, do not modify.
  148. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  149. -->
  150. insert into mini_user (id, type, voucher_id,
  151. indate, header_pic, nick_name,
  152. city)
  153. values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{voucherId,jdbcType=VARCHAR},
  154. #{indate,jdbcType=TIMESTAMP}, #{headerPic,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR},
  155. #{city,jdbcType=VARCHAR})
  156. </insert>
  157. <insert id="insertSelective" parameterType="com.hssx.entity.User">
  158. <!--
  159. WARNING - @mbg.generated
  160. This element is automatically generated by MyBatis Generator, do not modify.
  161. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  162. -->
  163. insert into mini_user
  164. <trim prefix="(" suffix=")" suffixOverrides=",">
  165. <if test="id != null">
  166. id,
  167. </if>
  168. <if test="type != null">
  169. type,
  170. </if>
  171. <if test="voucherId != null">
  172. voucher_id,
  173. </if>
  174. <if test="indate != null">
  175. indate,
  176. </if>
  177. <if test="headerPic != null">
  178. header_pic,
  179. </if>
  180. <if test="nickName != null">
  181. nick_name,
  182. </if>
  183. <if test="city != null">
  184. city,
  185. </if>
  186. </trim>
  187. <trim prefix="values (" suffix=")" suffixOverrides=",">
  188. <if test="id != null">
  189. #{id,jdbcType=VARCHAR},
  190. </if>
  191. <if test="type != null">
  192. #{type,jdbcType=INTEGER},
  193. </if>
  194. <if test="voucherId != null">
  195. #{voucherId,jdbcType=VARCHAR},
  196. </if>
  197. <if test="indate != null">
  198. #{indate,jdbcType=TIMESTAMP},
  199. </if>
  200. <if test="headerPic != null">
  201. #{headerPic,jdbcType=VARCHAR},
  202. </if>
  203. <if test="nickName != null">
  204. #{nickName,jdbcType=VARCHAR},
  205. </if>
  206. <if test="city != null">
  207. #{city,jdbcType=VARCHAR},
  208. </if>
  209. </trim>
  210. </insert>
  211. <select id="countByExample" parameterType="com.hssx.entity.UserExample" resultType="java.lang.Long">
  212. <!--
  213. WARNING - @mbg.generated
  214. This element is automatically generated by MyBatis Generator, do not modify.
  215. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  216. -->
  217. select count(*) from mini_user
  218. <if test="_parameter != null">
  219. <include refid="Example_Where_Clause" />
  220. </if>
  221. </select>
  222. <update id="updateByExampleSelective" parameterType="map">
  223. <!--
  224. WARNING - @mbg.generated
  225. This element is automatically generated by MyBatis Generator, do not modify.
  226. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  227. -->
  228. update mini_user
  229. <set>
  230. <if test="record.id != null">
  231. id = #{record.id,jdbcType=VARCHAR},
  232. </if>
  233. <if test="record.type != null">
  234. type = #{record.type,jdbcType=INTEGER},
  235. </if>
  236. <if test="record.voucherId != null">
  237. voucher_id = #{record.voucherId,jdbcType=VARCHAR},
  238. </if>
  239. <if test="record.indate != null">
  240. indate = #{record.indate,jdbcType=TIMESTAMP},
  241. </if>
  242. <if test="record.headerPic != null">
  243. header_pic = #{record.headerPic,jdbcType=VARCHAR},
  244. </if>
  245. <if test="record.nickName != null">
  246. nick_name = #{record.nickName,jdbcType=VARCHAR},
  247. </if>
  248. <if test="record.city != null">
  249. city = #{record.city,jdbcType=VARCHAR},
  250. </if>
  251. </set>
  252. <if test="_parameter != null">
  253. <include refid="Update_By_Example_Where_Clause" />
  254. </if>
  255. </update>
  256. <update id="updateByExample" parameterType="map">
  257. <!--
  258. WARNING - @mbg.generated
  259. This element is automatically generated by MyBatis Generator, do not modify.
  260. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  261. -->
  262. update mini_user
  263. set id = #{record.id,jdbcType=VARCHAR},
  264. type = #{record.type,jdbcType=INTEGER},
  265. voucher_id = #{record.voucherId,jdbcType=VARCHAR},
  266. indate = #{record.indate,jdbcType=TIMESTAMP},
  267. header_pic = #{record.headerPic,jdbcType=VARCHAR},
  268. nick_name = #{record.nickName,jdbcType=VARCHAR},
  269. city = #{record.city,jdbcType=VARCHAR}
  270. <if test="_parameter != null">
  271. <include refid="Update_By_Example_Where_Clause" />
  272. </if>
  273. </update>
  274. <update id="updateByPrimaryKeySelective" parameterType="com.hssx.entity.User">
  275. <!--
  276. WARNING - @mbg.generated
  277. This element is automatically generated by MyBatis Generator, do not modify.
  278. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  279. -->
  280. update mini_user
  281. <set>
  282. <if test="type != null">
  283. type = #{type,jdbcType=INTEGER},
  284. </if>
  285. <if test="voucherId != null">
  286. voucher_id = #{voucherId,jdbcType=VARCHAR},
  287. </if>
  288. <if test="indate != null">
  289. indate = #{indate,jdbcType=TIMESTAMP},
  290. </if>
  291. <if test="headerPic != null">
  292. header_pic = #{headerPic,jdbcType=VARCHAR},
  293. </if>
  294. <if test="nickName != null">
  295. nick_name = #{nickName,jdbcType=VARCHAR},
  296. </if>
  297. <if test="city != null">
  298. city = #{city,jdbcType=VARCHAR},
  299. </if>
  300. </set>
  301. where id = #{id,jdbcType=VARCHAR}
  302. </update>
  303. <update id="updateByPrimaryKey" parameterType="com.hssx.entity.User">
  304. <!--
  305. WARNING - @mbg.generated
  306. This element is automatically generated by MyBatis Generator, do not modify.
  307. This element was generated on Fri Sep 27 16:35:37 CST 2019.
  308. -->
  309. update mini_user
  310. set type = #{type,jdbcType=INTEGER},
  311. voucher_id = #{voucherId,jdbcType=VARCHAR},
  312. indate = #{indate,jdbcType=TIMESTAMP},
  313. header_pic = #{headerPic,jdbcType=VARCHAR},
  314. nick_name = #{nickName,jdbcType=VARCHAR},
  315. city = #{city,jdbcType=VARCHAR}
  316. where id = #{id,jdbcType=VARCHAR}
  317. </update>
  318. </mapper>