AmbPaymentApplicationMapper.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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.AmbPaymentApplicationMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.AmbPaymentApplication">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="type" jdbcType="INTEGER" property="type" />
  7. <result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
  8. <result column="content" jdbcType="VARCHAR" property="content" />
  9. <result column="remarks" jdbcType="VARCHAR" property="remarks" />
  10. <result column="annex_url" jdbcType="VARCHAR" property="annexUrl" />
  11. <result column="process_status" jdbcType="INTEGER" property="processStatus" />
  12. <result column="status" jdbcType="INTEGER" property="status" />
  13. <result column="create_by" jdbcType="VARCHAR" property="createBy" />
  14. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  15. <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
  16. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  17. </resultMap>
  18. <sql id="Base_Column_List">
  19. id, `type`, total_amount, content, remarks, annex_url, process_status, `status`,
  20. create_by, create_time, update_by, update_time
  21. </sql>
  22. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  23. select
  24. <include refid="Base_Column_List" />
  25. from amb_payment_application
  26. where id = #{id,jdbcType=BIGINT}
  27. </select>
  28. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  29. delete from amb_payment_application
  30. where id = #{id,jdbcType=BIGINT}
  31. </delete>
  32. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AmbPaymentApplication" useGeneratedKeys="true">
  33. insert into amb_payment_application (`type`, total_amount, content,
  34. remarks, annex_url, process_status,
  35. `status`, create_by, create_time,
  36. update_by, update_time)
  37. values (#{type,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL}, #{content,jdbcType=VARCHAR},
  38. #{remarks,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR}, #{processStatus,jdbcType=INTEGER},
  39. #{status,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
  40. #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
  41. </insert>
  42. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AmbPaymentApplication" useGeneratedKeys="true">
  43. insert into amb_payment_application
  44. <trim prefix="(" suffix=")" suffixOverrides=",">
  45. <if test="type != null">
  46. `type`,
  47. </if>
  48. <if test="totalAmount != null">
  49. total_amount,
  50. </if>
  51. <if test="content != null">
  52. content,
  53. </if>
  54. <if test="remarks != null">
  55. remarks,
  56. </if>
  57. <if test="annexUrl != null">
  58. annex_url,
  59. </if>
  60. <if test="processStatus != null">
  61. process_status,
  62. </if>
  63. <if test="status != null">
  64. `status`,
  65. </if>
  66. <if test="createBy != null">
  67. create_by,
  68. </if>
  69. <if test="createTime != null">
  70. create_time,
  71. </if>
  72. <if test="updateBy != null">
  73. update_by,
  74. </if>
  75. <if test="updateTime != null">
  76. update_time,
  77. </if>
  78. </trim>
  79. <trim prefix="values (" suffix=")" suffixOverrides=",">
  80. <if test="type != null">
  81. #{type,jdbcType=INTEGER},
  82. </if>
  83. <if test="totalAmount != null">
  84. #{totalAmount,jdbcType=DECIMAL},
  85. </if>
  86. <if test="content != null">
  87. #{content,jdbcType=VARCHAR},
  88. </if>
  89. <if test="remarks != null">
  90. #{remarks,jdbcType=VARCHAR},
  91. </if>
  92. <if test="annexUrl != null">
  93. #{annexUrl,jdbcType=VARCHAR},
  94. </if>
  95. <if test="processStatus != null">
  96. #{processStatus,jdbcType=INTEGER},
  97. </if>
  98. <if test="status != null">
  99. #{status,jdbcType=INTEGER},
  100. </if>
  101. <if test="createBy != null">
  102. #{createBy,jdbcType=VARCHAR},
  103. </if>
  104. <if test="createTime != null">
  105. #{createTime,jdbcType=TIMESTAMP},
  106. </if>
  107. <if test="updateBy != null">
  108. #{updateBy,jdbcType=VARCHAR},
  109. </if>
  110. <if test="updateTime != null">
  111. #{updateTime,jdbcType=TIMESTAMP},
  112. </if>
  113. </trim>
  114. </insert>
  115. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AmbPaymentApplication">
  116. update amb_payment_application
  117. <set>
  118. <if test="type != null">
  119. `type` = #{type,jdbcType=INTEGER},
  120. </if>
  121. <if test="totalAmount != null">
  122. total_amount = #{totalAmount,jdbcType=DECIMAL},
  123. </if>
  124. <if test="content != null">
  125. content = #{content,jdbcType=VARCHAR},
  126. </if>
  127. <if test="remarks != null">
  128. remarks = #{remarks,jdbcType=VARCHAR},
  129. </if>
  130. <if test="annexUrl != null">
  131. annex_url = #{annexUrl,jdbcType=VARCHAR},
  132. </if>
  133. <if test="processStatus != null">
  134. process_status = #{processStatus,jdbcType=INTEGER},
  135. </if>
  136. <if test="status != null">
  137. `status` = #{status,jdbcType=INTEGER},
  138. </if>
  139. <if test="createBy != null">
  140. create_by = #{createBy,jdbcType=VARCHAR},
  141. </if>
  142. <if test="createTime != null">
  143. create_time = #{createTime,jdbcType=TIMESTAMP},
  144. </if>
  145. <if test="updateBy != null">
  146. update_by = #{updateBy,jdbcType=VARCHAR},
  147. </if>
  148. <if test="updateTime != null">
  149. update_time = #{updateTime,jdbcType=TIMESTAMP},
  150. </if>
  151. </set>
  152. where id = #{id,jdbcType=BIGINT}
  153. </update>
  154. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.AmbPaymentApplication">
  155. update amb_payment_application
  156. set `type` = #{type,jdbcType=INTEGER},
  157. total_amount = #{totalAmount,jdbcType=DECIMAL},
  158. content = #{content,jdbcType=VARCHAR},
  159. remarks = #{remarks,jdbcType=VARCHAR},
  160. annex_url = #{annexUrl,jdbcType=VARCHAR},
  161. process_status = #{processStatus,jdbcType=INTEGER},
  162. `status` = #{status,jdbcType=INTEGER},
  163. create_by = #{createBy,jdbcType=VARCHAR},
  164. create_time = #{createTime,jdbcType=TIMESTAMP},
  165. update_by = #{updateBy,jdbcType=VARCHAR},
  166. update_time = #{updateTime,jdbcType=TIMESTAMP}
  167. where id = #{id,jdbcType=BIGINT}
  168. </update>
  169. </mapper>