ApiOrderExceptionRecordMapper.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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.ApiOrderExceptionRecordMapper" >
  4. <resultMap id="BaseResultMap" type="com.kmall.api.entity.MallOrderExceptionRecord" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="order_sn" property="orderSn" jdbcType="VARCHAR" />
  7. <result column="user_id" property="userId" jdbcType="INTEGER" />
  8. <result column="exception_content" property="exceptionContent" jdbcType="VARCHAR" />
  9. <result column="exception_status" property="exceptionStatus" jdbcType="CHAR" />
  10. <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
  11. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  12. <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
  13. <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
  14. <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
  15. </resultMap>
  16. <sql id="Base_Column_List" >
  17. id, order_sn, user_id, exception_content, exception_status, creater_sn, create_time,
  18. moder_sn, mod_time, tstm
  19. </sql>
  20. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  21. select
  22. <include refid="Base_Column_List" />
  23. from mall_order_exception_record
  24. where id = #{id,jdbcType=INTEGER}
  25. </select>
  26. <delete id="delete" parameterType="java.lang.Integer" >
  27. delete from mall_order_exception_record
  28. where id = #{id,jdbcType=INTEGER}
  29. </delete>
  30. <insert id="save" parameterType="com.kmall.api.entity.MallOrderExceptionRecord" useGeneratedKeys="true" keyProperty="id">
  31. insert into mall_order_exception_record
  32. <trim prefix="(" suffix=")" suffixOverrides="," >
  33. <if test="orderSn != null" >
  34. order_sn,
  35. </if>
  36. <if test="userId != null" >
  37. user_id,
  38. </if>
  39. <if test="exceptionContent != null" >
  40. exception_content,
  41. </if>
  42. <if test="exceptionStatus != null" >
  43. exception_status,
  44. </if>
  45. <if test="createrSn != null" >
  46. creater_sn,
  47. </if>
  48. <if test="createTime != null" >
  49. create_time,
  50. </if>
  51. <if test="moderSn != null" >
  52. moder_sn,
  53. </if>
  54. <if test="modTime != null" >
  55. mod_time,
  56. </if>
  57. <if test="tstm != null" >
  58. tstm,
  59. </if>
  60. </trim>
  61. <trim prefix="values (" suffix=")" suffixOverrides="," >
  62. <if test="orderSn != null" >
  63. #{orderSn,jdbcType=VARCHAR},
  64. </if>
  65. <if test="userId != null" >
  66. #{userId,jdbcType=INTEGER},
  67. </if>
  68. <if test="exceptionContent != null" >
  69. #{exceptionContent,jdbcType=VARCHAR},
  70. </if>
  71. <if test="exceptionStatus != null" >
  72. #{exceptionStatus,jdbcType=CHAR},
  73. </if>
  74. <if test="createrSn != null" >
  75. #{createrSn,jdbcType=VARCHAR},
  76. </if>
  77. <if test="createTime != null" >
  78. #{createTime,jdbcType=TIMESTAMP},
  79. </if>
  80. <if test="moderSn != null" >
  81. #{moderSn,jdbcType=VARCHAR},
  82. </if>
  83. <if test="modTime != null" >
  84. #{modTime,jdbcType=TIMESTAMP},
  85. </if>
  86. <if test="tstm != null" >
  87. #{tstm,jdbcType=TIMESTAMP},
  88. </if>
  89. </trim>
  90. </insert>
  91. <update id="update" parameterType="com.kmall.api.entity.MallOrderExceptionRecord" >
  92. update mall_order_exception_record
  93. <set >
  94. <if test="orderSn != null" >
  95. order_sn = #{orderSn,jdbcType=VARCHAR},
  96. </if>
  97. <if test="userId != null" >
  98. user_id = #{userId,jdbcType=INTEGER},
  99. </if>
  100. <if test="exceptionContent != null" >
  101. exception_content = #{exceptionContent,jdbcType=VARCHAR},
  102. </if>
  103. <if test="exceptionStatus != null" >
  104. exception_status = #{exceptionStatus,jdbcType=CHAR},
  105. </if>
  106. <if test="createrSn != null" >
  107. creater_sn = #{createrSn,jdbcType=VARCHAR},
  108. </if>
  109. <if test="createTime != null" >
  110. create_time = #{createTime,jdbcType=TIMESTAMP},
  111. </if>
  112. <if test="moderSn != null" >
  113. moder_sn = #{moderSn,jdbcType=VARCHAR},
  114. </if>
  115. <if test="modTime != null" >
  116. mod_time = #{modTime,jdbcType=TIMESTAMP},
  117. </if>
  118. <if test="tstm != null" >
  119. tstm = #{tstm,jdbcType=TIMESTAMP},
  120. </if>
  121. </set>
  122. where id = #{id,jdbcType=INTEGER}
  123. </update>
  124. </mapper>