1
0

MallOrderRefundMapper.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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.kmall.api.dao.MallOrderRefundMapper" >
  4. <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallOrderRefund" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="order_id" property="orderId" jdbcType="INTEGER" />
  7. <result column="user_id" property="userId" jdbcType="INTEGER" />
  8. <result column="refund_type" property="refundType" jdbcType="TINYINT" />
  9. <result column="refund_time" property="refundTime" jdbcType="TIMESTAMP" />
  10. <result column="creator" property="creator" jdbcType="VARCHAR" />
  11. <result column="refund_money" property="refundMoney" jdbcType="DECIMAL" />
  12. <result column="refund_status" property="refundStatus" jdbcType="TINYINT" />
  13. <result column="refund_reason" property="refundReason" jdbcType="VARCHAR" />
  14. <result column="approver" property="approver" jdbcType="VARCHAR" />
  15. <result column="approval_time" property="approvalTime" jdbcType="TIMESTAMP" />
  16. <result column="approval_remark" property="approvalRemark" jdbcType="VARCHAR" />
  17. <result column="create_sn" property="createSn" jdbcType="VARCHAR" />
  18. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  19. <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
  20. <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
  21. <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
  22. </resultMap>
  23. <sql id="Base_Column_List" >
  24. id, order_id, user_id, refund_type, refund_time, creator, refund_money, refund_status,
  25. refund_reason, approver, approval_time, approval_remark, create_sn, create_time,
  26. moder_sn, mod_time, tstm
  27. </sql>
  28. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  29. select
  30. <include refid="Base_Column_List" />
  31. from mall_order_refund
  32. where id = #{id,jdbcType=INTEGER}
  33. </select>
  34. <delete id="delete" parameterType="java.lang.Integer" >
  35. delete from mall_order_refund
  36. where id = #{id,jdbcType=INTEGER}
  37. </delete>
  38. <insert id="save" parameterType="com.kmall.api.entity.MallOrderRefund" useGeneratedKeys="true" keyProperty="id">
  39. insert into mall_order_refund
  40. <trim prefix="(" suffix=")" suffixOverrides="," >
  41. <if test="id != null" >
  42. id,
  43. </if>
  44. <if test="orderId != null" >
  45. order_id,
  46. </if>
  47. <if test="userId != null" >
  48. user_id,
  49. </if>
  50. <if test="refundType != null" >
  51. refund_type,
  52. </if>
  53. <if test="refundTime != null" >
  54. refund_time,
  55. </if>
  56. <if test="creator != null" >
  57. creator,
  58. </if>
  59. <if test="refundMoney != null" >
  60. refund_money,
  61. </if>
  62. <if test="refundStatus != null" >
  63. refund_status,
  64. </if>
  65. <if test="refundReason != null" >
  66. refund_reason,
  67. </if>
  68. <if test="approver != null" >
  69. approver,
  70. </if>
  71. <if test="approvalTime != null" >
  72. approval_time,
  73. </if>
  74. <if test="approvalRemark != null" >
  75. approval_remark,
  76. </if>
  77. <if test="createSn != null" >
  78. create_sn,
  79. </if>
  80. <if test="createTime != null" >
  81. create_time,
  82. </if>
  83. <if test="moderSn != null" >
  84. moder_sn,
  85. </if>
  86. <if test="modTime != null" >
  87. mod_time,
  88. </if>
  89. <if test="tstm != null" >
  90. tstm,
  91. </if>
  92. </trim>
  93. <trim prefix="values (" suffix=")" suffixOverrides="," >
  94. <if test="id != null" >
  95. #{id,jdbcType=INTEGER},
  96. </if>
  97. <if test="orderId != null" >
  98. #{orderId,jdbcType=INTEGER},
  99. </if>
  100. <if test="userId != null" >
  101. #{userId,jdbcType=INTEGER},
  102. </if>
  103. <if test="refundType != null" >
  104. #{refundType,jdbcType=TINYINT},
  105. </if>
  106. <if test="refundTime != null" >
  107. #{refundTime,jdbcType=TIMESTAMP},
  108. </if>
  109. <if test="creator != null" >
  110. #{creator,jdbcType=VARCHAR},
  111. </if>
  112. <if test="refundMoney != null" >
  113. #{refundMoney,jdbcType=DECIMAL},
  114. </if>
  115. <if test="refundStatus != null" >
  116. #{refundStatus,jdbcType=TINYINT},
  117. </if>
  118. <if test="refundReason != null" >
  119. #{refundReason,jdbcType=VARCHAR},
  120. </if>
  121. <if test="approver != null" >
  122. #{approver,jdbcType=VARCHAR},
  123. </if>
  124. <if test="approvalTime != null" >
  125. #{approvalTime,jdbcType=TIMESTAMP},
  126. </if>
  127. <if test="approvalRemark != null" >
  128. #{approvalRemark,jdbcType=VARCHAR},
  129. </if>
  130. <if test="createSn != null" >
  131. #{createSn,jdbcType=VARCHAR},
  132. </if>
  133. <if test="createTime != null" >
  134. #{createTime,jdbcType=TIMESTAMP},
  135. </if>
  136. <if test="moderSn != null" >
  137. #{moderSn,jdbcType=VARCHAR},
  138. </if>
  139. <if test="modTime != null" >
  140. #{modTime,jdbcType=TIMESTAMP},
  141. </if>
  142. <if test="tstm != null" >
  143. #{tstm,jdbcType=TIMESTAMP},
  144. </if>
  145. </trim>
  146. </insert>
  147. <update id="update" parameterType="com.kmall.api.entity.MallOrderRefund" >
  148. update mall_order_refund
  149. <set >
  150. <if test="orderId != null" >
  151. order_id = #{orderId,jdbcType=INTEGER},
  152. </if>
  153. <if test="userId != null" >
  154. user_id = #{userId,jdbcType=INTEGER},
  155. </if>
  156. <if test="refundType != null" >
  157. refund_type = #{refundType,jdbcType=TINYINT},
  158. </if>
  159. <if test="refundTime != null" >
  160. refund_time = #{refundTime,jdbcType=TIMESTAMP},
  161. </if>
  162. <if test="creator != null" >
  163. creator = #{creator,jdbcType=VARCHAR},
  164. </if>
  165. <if test="refundMoney != null" >
  166. refund_money = #{refundMoney,jdbcType=DECIMAL},
  167. </if>
  168. <if test="refundStatus != null" >
  169. refund_status = #{refundStatus,jdbcType=TINYINT},
  170. </if>
  171. <if test="refundReason != null" >
  172. refund_reason = #{refundReason,jdbcType=VARCHAR},
  173. </if>
  174. <if test="approver != null" >
  175. approver = #{approver,jdbcType=VARCHAR},
  176. </if>
  177. <if test="approvalTime != null" >
  178. approval_time = #{approvalTime,jdbcType=TIMESTAMP},
  179. </if>
  180. <if test="approvalRemark != null" >
  181. approval_remark = #{approvalRemark,jdbcType=VARCHAR},
  182. </if>
  183. <if test="createSn != null" >
  184. create_sn = #{createSn,jdbcType=VARCHAR},
  185. </if>
  186. <if test="createTime != null" >
  187. create_time = #{createTime,jdbcType=TIMESTAMP},
  188. </if>
  189. <if test="moderSn != null" >
  190. moder_sn = #{moderSn,jdbcType=VARCHAR},
  191. </if>
  192. <if test="modTime != null" >
  193. mod_time = #{modTime,jdbcType=TIMESTAMP},
  194. </if>
  195. <if test="tstm != null" >
  196. tstm = #{tstm,jdbcType=TIMESTAMP},
  197. </if>
  198. </set>
  199. where id = #{id,jdbcType=INTEGER}
  200. </update>
  201. </mapper>