RefundOrderMapper.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.mofangchuxing.aska.dao.mapper.RefundOrderMapper">
  6. <resultMap id="BaseResultMap" type="com.mofangchuxing.aska.dao.domain.RefundOrder">
  7. <id property="id" column="id" jdbcType="INTEGER"/>
  8. <result property="orderSn" column="order_sn" jdbcType="VARCHAR"/>
  9. <result property="refundOrderSn" column="refund_order_sn" jdbcType="VARCHAR"/>
  10. <result property="refundAmount" column="refund_amount" jdbcType="INTEGER"/>
  11. <result property="message" column="message" jdbcType="VARCHAR"/>
  12. <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
  13. <result property="modifiedTime" column="modified_time" jdbcType="TIMESTAMP"/>
  14. </resultMap>
  15. <sql id="Base_Column_List">
  16. id,order_sn,refund_order_sn,
  17. refund_amount,message,create_time,
  18. modified_time
  19. </sql>
  20. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  21. select
  22. <include refid="Base_Column_List" />
  23. from refund_order
  24. where id = #{id,jdbcType=INTEGER}
  25. </select>
  26. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  27. delete from refund_order
  28. where id = #{id,jdbcType=INTEGER}
  29. </delete>
  30. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.RefundOrder" useGeneratedKeys="true">
  31. insert into refund_order
  32. ( id,order_sn,refund_order_sn
  33. ,refund_amount,message,create_time
  34. ,modified_time)
  35. values (#{id,jdbcType=INTEGER},#{orderSn,jdbcType=VARCHAR},#{refundOrderSn,jdbcType=VARCHAR}
  36. ,#{refundAmount,jdbcType=INTEGER},#{message,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP}
  37. ,#{modifiedTime,jdbcType=TIMESTAMP})
  38. </insert>
  39. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.RefundOrder" useGeneratedKeys="true">
  40. insert into refund_order
  41. <trim prefix="(" suffix=")" suffixOverrides=",">
  42. <if test="id != null">id,</if>
  43. <if test="orderSn != null">order_sn,</if>
  44. <if test="refundOrderSn != null">refund_order_sn,</if>
  45. <if test="refundAmount != null">refund_amount,</if>
  46. <if test="message != null">message,</if>
  47. <if test="createTime != null">create_time,</if>
  48. <if test="modifiedTime != null">modified_time,</if>
  49. </trim>
  50. <trim prefix="values (" suffix=")" suffixOverrides=",">
  51. <if test="id != null">#{id,jdbcType=INTEGER},</if>
  52. <if test="orderSn != null">#{orderSn,jdbcType=VARCHAR},</if>
  53. <if test="refundOrderSn != null">#{refundOrderSn,jdbcType=VARCHAR},</if>
  54. <if test="refundAmount != null">#{refundAmount,jdbcType=INTEGER},</if>
  55. <if test="message != null">#{message,jdbcType=VARCHAR},</if>
  56. <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
  57. <if test="modifiedTime != null">#{modifiedTime,jdbcType=TIMESTAMP},</if>
  58. </trim>
  59. </insert>
  60. <update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.RefundOrder">
  61. update refund_order
  62. <set>
  63. <if test="orderSn != null">
  64. order_sn = #{orderSn,jdbcType=VARCHAR},
  65. </if>
  66. <if test="refundOrderSn != null">
  67. refund_order_sn = #{refundOrderSn,jdbcType=VARCHAR},
  68. </if>
  69. <if test="refundAmount != null">
  70. refund_amount = #{refundAmount,jdbcType=INTEGER},
  71. </if>
  72. <if test="message != null">
  73. message = #{message,jdbcType=VARCHAR},
  74. </if>
  75. <if test="createTime != null">
  76. create_time = #{createTime,jdbcType=TIMESTAMP},
  77. </if>
  78. <if test="modifiedTime != null">
  79. modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
  80. </if>
  81. </set>
  82. where id = #{id,jdbcType=INTEGER}
  83. </update>
  84. <update id="updateByPrimaryKey" parameterType="com.mofangchuxing.aska.dao.domain.RefundOrder">
  85. update refund_order
  86. set
  87. order_sn = #{orderSn,jdbcType=VARCHAR},
  88. refund_order_sn = #{refundOrderSn,jdbcType=VARCHAR},
  89. refund_amount = #{refundAmount,jdbcType=INTEGER},
  90. message = #{message,jdbcType=VARCHAR},
  91. create_time = #{createTime,jdbcType=TIMESTAMP},
  92. modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
  93. where id = #{id,jdbcType=INTEGER}
  94. </update>
  95. </mapper>