WithdrawMapper.xml 13 KB

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