TOrderBackMapper.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  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.TOrderBackMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderBack">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
  12. <result column="back_status" jdbcType="INTEGER" property="backStatus" />
  13. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  14. <result column="initiate" jdbcType="VARCHAR" property="initiate" />
  15. <result column="accept" jdbcType="VARCHAR" property="accept" />
  16. <result column="reason" jdbcType="VARCHAR" property="reason" />
  17. <result column="result" jdbcType="VARCHAR" property="result" />
  18. </resultMap>
  19. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.TOrderBack">
  20. <!--
  21. WARNING - @mbg.generated
  22. This element is automatically generated by MyBatis Generator, do not modify.
  23. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  24. -->
  25. <result column="reason_attachment_url" jdbcType="LONGVARCHAR" property="reasonAttachmentUrl" />
  26. </resultMap>
  27. <sql id="Example_Where_Clause">
  28. <!--
  29. WARNING - @mbg.generated
  30. This element is automatically generated by MyBatis Generator, do not modify.
  31. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  32. -->
  33. <where>
  34. <foreach collection="oredCriteria" item="criteria" separator="or">
  35. <if test="criteria.valid">
  36. <trim prefix="(" prefixOverrides="and" suffix=")">
  37. <foreach collection="criteria.criteria" item="criterion">
  38. <choose>
  39. <when test="criterion.noValue">
  40. and ${criterion.condition}
  41. </when>
  42. <when test="criterion.singleValue">
  43. and ${criterion.condition} #{criterion.value}
  44. </when>
  45. <when test="criterion.betweenValue">
  46. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  47. </when>
  48. <when test="criterion.listValue">
  49. and ${criterion.condition}
  50. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  51. #{listItem}
  52. </foreach>
  53. </when>
  54. </choose>
  55. </foreach>
  56. </trim>
  57. </if>
  58. </foreach>
  59. </where>
  60. </sql>
  61. <sql id="Update_By_Example_Where_Clause">
  62. <!--
  63. WARNING - @mbg.generated
  64. This element is automatically generated by MyBatis Generator, do not modify.
  65. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  66. -->
  67. <where>
  68. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  69. <if test="criteria.valid">
  70. <trim prefix="(" prefixOverrides="and" suffix=")">
  71. <foreach collection="criteria.criteria" item="criterion">
  72. <choose>
  73. <when test="criterion.noValue">
  74. and ${criterion.condition}
  75. </when>
  76. <when test="criterion.singleValue">
  77. and ${criterion.condition} #{criterion.value}
  78. </when>
  79. <when test="criterion.betweenValue">
  80. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  81. </when>
  82. <when test="criterion.listValue">
  83. and ${criterion.condition}
  84. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  85. #{listItem}
  86. </foreach>
  87. </when>
  88. </choose>
  89. </foreach>
  90. </trim>
  91. </if>
  92. </foreach>
  93. </where>
  94. </sql>
  95. <sql id="Base_Column_List">
  96. <!--
  97. WARNING - @mbg.generated
  98. This element is automatically generated by MyBatis Generator, do not modify.
  99. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  100. -->
  101. id, order_no, back_status, create_time, initiate, accept, reason, result
  102. </sql>
  103. <sql id="Blob_Column_List">
  104. <!--
  105. WARNING - @mbg.generated
  106. This element is automatically generated by MyBatis Generator, do not modify.
  107. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  108. -->
  109. reason_attachment_url
  110. </sql>
  111. <select id="selectByExampleWithBLOBs" parameterType="com.goafanti.common.model.TOrderBackExample" resultMap="ResultMapWithBLOBs">
  112. <!--
  113. WARNING - @mbg.generated
  114. This element is automatically generated by MyBatis Generator, do not modify.
  115. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  116. -->
  117. select
  118. <if test="distinct">
  119. distinct
  120. </if>
  121. <include refid="Base_Column_List" />
  122. ,
  123. <include refid="Blob_Column_List" />
  124. from t_order_back
  125. <if test="_parameter != null">
  126. <include refid="Example_Where_Clause" />
  127. </if>
  128. <if test="orderByClause != null">
  129. order by ${orderByClause}
  130. </if>
  131. </select>
  132. <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderBackExample" resultMap="BaseResultMap">
  133. <!--
  134. WARNING - @mbg.generated
  135. This element is automatically generated by MyBatis Generator, do not modify.
  136. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  137. -->
  138. select
  139. <if test="distinct">
  140. distinct
  141. </if>
  142. <include refid="Base_Column_List" />
  143. from t_order_back
  144. <if test="_parameter != null">
  145. <include refid="Example_Where_Clause" />
  146. </if>
  147. <if test="orderByClause != null">
  148. order by ${orderByClause}
  149. </if>
  150. </select>
  151. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
  152. <!--
  153. WARNING - @mbg.generated
  154. This element is automatically generated by MyBatis Generator, do not modify.
  155. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  156. -->
  157. select
  158. <include refid="Base_Column_List" />
  159. ,
  160. <include refid="Blob_Column_List" />
  161. from t_order_back
  162. where id = #{id,jdbcType=INTEGER}
  163. </select>
  164. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  165. <!--
  166. WARNING - @mbg.generated
  167. This element is automatically generated by MyBatis Generator, do not modify.
  168. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  169. -->
  170. delete from t_order_back
  171. where id = #{id,jdbcType=INTEGER}
  172. </delete>
  173. <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderBackExample">
  174. <!--
  175. WARNING - @mbg.generated
  176. This element is automatically generated by MyBatis Generator, do not modify.
  177. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  178. -->
  179. delete from t_order_back
  180. <if test="_parameter != null">
  181. <include refid="Example_Where_Clause" />
  182. </if>
  183. </delete>
  184. <insert id="insert" parameterType="com.goafanti.common.model.TOrderBack">
  185. <!--
  186. WARNING - @mbg.generated
  187. This element is automatically generated by MyBatis Generator, do not modify.
  188. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  189. -->
  190. insert into t_order_back (id, order_no, back_status,
  191. create_time, initiate, accept,
  192. reason, result, reason_attachment_url
  193. )
  194. values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER},
  195. #{createTime,jdbcType=TIMESTAMP}, #{initiate,jdbcType=VARCHAR}, #{accept,jdbcType=VARCHAR},
  196. #{reason,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{reasonAttachmentUrl,jdbcType=LONGVARCHAR}
  197. )
  198. </insert>
  199. <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderBack">
  200. <!--
  201. WARNING - @mbg.generated
  202. This element is automatically generated by MyBatis Generator, do not modify.
  203. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  204. -->
  205. insert into t_order_back
  206. <trim prefix="(" suffix=")" suffixOverrides=",">
  207. <if test="id != null">
  208. id,
  209. </if>
  210. <if test="orderNo != null">
  211. order_no,
  212. </if>
  213. <if test="backStatus != null">
  214. back_status,
  215. </if>
  216. <if test="createTime != null">
  217. create_time,
  218. </if>
  219. <if test="initiate != null">
  220. initiate,
  221. </if>
  222. <if test="accept != null">
  223. accept,
  224. </if>
  225. <if test="reason != null">
  226. reason,
  227. </if>
  228. <if test="result != null">
  229. result,
  230. </if>
  231. <if test="reasonAttachmentUrl != null">
  232. reason_attachment_url,
  233. </if>
  234. </trim>
  235. <trim prefix="values (" suffix=")" suffixOverrides=",">
  236. <if test="id != null">
  237. #{id,jdbcType=INTEGER},
  238. </if>
  239. <if test="orderNo != null">
  240. #{orderNo,jdbcType=VARCHAR},
  241. </if>
  242. <if test="backStatus != null">
  243. #{backStatus,jdbcType=INTEGER},
  244. </if>
  245. <if test="createTime != null">
  246. #{createTime,jdbcType=TIMESTAMP},
  247. </if>
  248. <if test="initiate != null">
  249. #{initiate,jdbcType=VARCHAR},
  250. </if>
  251. <if test="accept != null">
  252. #{accept,jdbcType=VARCHAR},
  253. </if>
  254. <if test="reason != null">
  255. #{reason,jdbcType=VARCHAR},
  256. </if>
  257. <if test="result != null">
  258. #{result,jdbcType=VARCHAR},
  259. </if>
  260. <if test="reasonAttachmentUrl != null">
  261. #{reasonAttachmentUrl,jdbcType=LONGVARCHAR},
  262. </if>
  263. </trim>
  264. </insert>
  265. <select id="countByExample" parameterType="com.goafanti.common.model.TOrderBackExample" resultType="java.lang.Long">
  266. <!--
  267. WARNING - @mbg.generated
  268. This element is automatically generated by MyBatis Generator, do not modify.
  269. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  270. -->
  271. select count(*) from t_order_back
  272. <if test="_parameter != null">
  273. <include refid="Example_Where_Clause" />
  274. </if>
  275. </select>
  276. <update id="updateByExampleSelective" parameterType="map">
  277. <!--
  278. WARNING - @mbg.generated
  279. This element is automatically generated by MyBatis Generator, do not modify.
  280. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  281. -->
  282. update t_order_back
  283. <set>
  284. <if test="record.id != null">
  285. id = #{record.id,jdbcType=INTEGER},
  286. </if>
  287. <if test="record.orderNo != null">
  288. order_no = #{record.orderNo,jdbcType=VARCHAR},
  289. </if>
  290. <if test="record.backStatus != null">
  291. back_status = #{record.backStatus,jdbcType=INTEGER},
  292. </if>
  293. <if test="record.createTime != null">
  294. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  295. </if>
  296. <if test="record.initiate != null">
  297. initiate = #{record.initiate,jdbcType=VARCHAR},
  298. </if>
  299. <if test="record.accept != null">
  300. accept = #{record.accept,jdbcType=VARCHAR},
  301. </if>
  302. <if test="record.reason != null">
  303. reason = #{record.reason,jdbcType=VARCHAR},
  304. </if>
  305. <if test="record.result != null">
  306. result = #{record.result,jdbcType=VARCHAR},
  307. </if>
  308. <if test="record.reasonAttachmentUrl != null">
  309. reason_attachment_url = #{record.reasonAttachmentUrl,jdbcType=LONGVARCHAR},
  310. </if>
  311. </set>
  312. <if test="_parameter != null">
  313. <include refid="Update_By_Example_Where_Clause" />
  314. </if>
  315. </update>
  316. <update id="updateByExampleWithBLOBs" parameterType="map">
  317. <!--
  318. WARNING - @mbg.generated
  319. This element is automatically generated by MyBatis Generator, do not modify.
  320. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  321. -->
  322. update t_order_back
  323. set id = #{record.id,jdbcType=INTEGER},
  324. order_no = #{record.orderNo,jdbcType=VARCHAR},
  325. back_status = #{record.backStatus,jdbcType=INTEGER},
  326. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  327. initiate = #{record.initiate,jdbcType=VARCHAR},
  328. accept = #{record.accept,jdbcType=VARCHAR},
  329. reason = #{record.reason,jdbcType=VARCHAR},
  330. result = #{record.result,jdbcType=VARCHAR},
  331. reason_attachment_url = #{record.reasonAttachmentUrl,jdbcType=LONGVARCHAR}
  332. <if test="_parameter != null">
  333. <include refid="Update_By_Example_Where_Clause" />
  334. </if>
  335. </update>
  336. <update id="updateByExample" parameterType="map">
  337. <!--
  338. WARNING - @mbg.generated
  339. This element is automatically generated by MyBatis Generator, do not modify.
  340. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  341. -->
  342. update t_order_back
  343. set id = #{record.id,jdbcType=INTEGER},
  344. order_no = #{record.orderNo,jdbcType=VARCHAR},
  345. back_status = #{record.backStatus,jdbcType=INTEGER},
  346. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  347. initiate = #{record.initiate,jdbcType=VARCHAR},
  348. accept = #{record.accept,jdbcType=VARCHAR},
  349. reason = #{record.reason,jdbcType=VARCHAR},
  350. result = #{record.result,jdbcType=VARCHAR}
  351. <if test="_parameter != null">
  352. <include refid="Update_By_Example_Where_Clause" />
  353. </if>
  354. </update>
  355. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderBack">
  356. <!--
  357. WARNING - @mbg.generated
  358. This element is automatically generated by MyBatis Generator, do not modify.
  359. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  360. -->
  361. update t_order_back
  362. <set>
  363. <if test="orderNo != null">
  364. order_no = #{orderNo,jdbcType=VARCHAR},
  365. </if>
  366. <if test="backStatus != null">
  367. back_status = #{backStatus,jdbcType=INTEGER},
  368. </if>
  369. <if test="createTime != null">
  370. create_time = #{createTime,jdbcType=TIMESTAMP},
  371. </if>
  372. <if test="initiate != null">
  373. initiate = #{initiate,jdbcType=VARCHAR},
  374. </if>
  375. <if test="accept != null">
  376. accept = #{accept,jdbcType=VARCHAR},
  377. </if>
  378. <if test="reason != null">
  379. reason = #{reason,jdbcType=VARCHAR},
  380. </if>
  381. <if test="result != null">
  382. result = #{result,jdbcType=VARCHAR},
  383. </if>
  384. <if test="reasonAttachmentUrl != null">
  385. reason_attachment_url = #{reasonAttachmentUrl,jdbcType=LONGVARCHAR},
  386. </if>
  387. </set>
  388. where id = #{id,jdbcType=INTEGER}
  389. </update>
  390. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.TOrderBack">
  391. <!--
  392. WARNING - @mbg.generated
  393. This element is automatically generated by MyBatis Generator, do not modify.
  394. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  395. -->
  396. update t_order_back
  397. set order_no = #{orderNo,jdbcType=VARCHAR},
  398. back_status = #{backStatus,jdbcType=INTEGER},
  399. create_time = #{createTime,jdbcType=TIMESTAMP},
  400. initiate = #{initiate,jdbcType=VARCHAR},
  401. accept = #{accept,jdbcType=VARCHAR},
  402. reason = #{reason,jdbcType=VARCHAR},
  403. result = #{result,jdbcType=VARCHAR},
  404. reason_attachment_url = #{reasonAttachmentUrl,jdbcType=LONGVARCHAR}
  405. where id = #{id,jdbcType=INTEGER}
  406. </update>
  407. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderBack">
  408. <!--
  409. WARNING - @mbg.generated
  410. This element is automatically generated by MyBatis Generator, do not modify.
  411. This element was generated on Wed Nov 21 11:44:14 CST 2018.
  412. -->
  413. update t_order_back
  414. set order_no = #{orderNo,jdbcType=VARCHAR},
  415. back_status = #{backStatus,jdbcType=INTEGER},
  416. create_time = #{createTime,jdbcType=TIMESTAMP},
  417. initiate = #{initiate,jdbcType=VARCHAR},
  418. accept = #{accept,jdbcType=VARCHAR},
  419. reason = #{reason,jdbcType=VARCHAR},
  420. result = #{result,jdbcType=VARCHAR}
  421. where id = #{id,jdbcType=INTEGER}
  422. </update>
  423. <update id="updateByOrderNoAndBackStatus" parameterType="java.lang.String">
  424. update t_order_back set back_status=1 where back_status=0 and order_no= #{orderNo,jdbcType=VARCHAR}
  425. </update>
  426. </mapper>