JtConsultOrderMapper.xml 19 KB

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