PatentPaymentDetailsMapper.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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.PatentPaymentDetailsMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.PatentPaymentDetails">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Fri Aug 06 15:00:19 CST 2021.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="pid" jdbcType="INTEGER" property="pid" />
  12. <result column="years" jdbcType="INTEGER" property="years" />
  13. <result column="patent_amount" jdbcType="DECIMAL" property="patentAmount" />
  14. <result column="end_date" jdbcType="DATE" property="endDate" />
  15. <result column="status" jdbcType="INTEGER" property="status" />
  16. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  17. </resultMap>
  18. <sql id="Base_Column_List">
  19. <!--
  20. WARNING - @mbg.generated
  21. This element is automatically generated by MyBatis Generator, do not modify.
  22. This element was generated on Fri Aug 06 15:00:19 CST 2021.
  23. -->
  24. id, pid, `years`, patent_amount, end_date, `status`, create_time
  25. </sql>
  26. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  27. <!--
  28. WARNING - @mbg.generated
  29. This element is automatically generated by MyBatis Generator, do not modify.
  30. This element was generated on Fri Aug 06 15:00:19 CST 2021.
  31. -->
  32. select
  33. <include refid="Base_Column_List" />
  34. from patent_payment_details
  35. where id = #{id,jdbcType=INTEGER}
  36. </select>
  37. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  38. <!--
  39. WARNING - @mbg.generated
  40. This element is automatically generated by MyBatis Generator, do not modify.
  41. This element was generated on Fri Aug 06 15:00:19 CST 2021.
  42. -->
  43. delete from patent_payment_details
  44. where id = #{id,jdbcType=INTEGER}
  45. </delete>
  46. <insert id="insert" parameterType="com.goafanti.common.model.PatentPaymentDetails">
  47. <!--
  48. WARNING - @mbg.generated
  49. This element is automatically generated by MyBatis Generator, do not modify.
  50. This element was generated on Fri Aug 06 15:00:19 CST 2021.
  51. -->
  52. insert into patent_payment_details (id, pid, `years`,
  53. patent_amount, end_date, `status`,
  54. create_time)
  55. values (#{id,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{years,jdbcType=INTEGER},
  56. #{patentAmount,jdbcType=DECIMAL}, #{endDate,jdbcType=DATE}, #{status,jdbcType=INTEGER},
  57. #{createTime,jdbcType=TIMESTAMP})
  58. </insert>
  59. <insert id="insertSelective" parameterType="com.goafanti.common.model.PatentPaymentDetails">
  60. <!--
  61. WARNING - @mbg.generated
  62. This element is automatically generated by MyBatis Generator, do not modify.
  63. This element was generated on Fri Aug 06 15:00:19 CST 2021.
  64. -->
  65. insert into patent_payment_details
  66. <trim prefix="(" suffix=")" suffixOverrides=",">
  67. <if test="id != null">
  68. id,
  69. </if>
  70. <if test="pid != null">
  71. pid,
  72. </if>
  73. <if test="years != null">
  74. `years`,
  75. </if>
  76. <if test="patentAmount != null">
  77. patent_amount,
  78. </if>
  79. <if test="endDate != null">
  80. end_date,
  81. </if>
  82. <if test="status != null">
  83. `status`,
  84. </if>
  85. <if test="createTime != null">
  86. create_time,
  87. </if>
  88. </trim>
  89. <trim prefix="values (" suffix=")" suffixOverrides=",">
  90. <if test="id != null">
  91. #{id,jdbcType=INTEGER},
  92. </if>
  93. <if test="pid != null">
  94. #{pid,jdbcType=INTEGER},
  95. </if>
  96. <if test="years != null">
  97. #{years,jdbcType=INTEGER},
  98. </if>
  99. <if test="patentAmount != null">
  100. #{patentAmount,jdbcType=DECIMAL},
  101. </if>
  102. <if test="endDate != null">
  103. #{endDate,jdbcType=DATE},
  104. </if>
  105. <if test="status != null">
  106. #{status,jdbcType=INTEGER},
  107. </if>
  108. <if test="createTime != null">
  109. #{createTime,jdbcType=TIMESTAMP},
  110. </if>
  111. </trim>
  112. </insert>
  113. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PatentPaymentDetails">
  114. <!--
  115. WARNING - @mbg.generated
  116. This element is automatically generated by MyBatis Generator, do not modify.
  117. This element was generated on Fri Aug 06 15:00:19 CST 2021.
  118. -->
  119. update patent_payment_details
  120. <set>
  121. <if test="pid != null">
  122. pid = #{pid,jdbcType=INTEGER},
  123. </if>
  124. <if test="years != null">
  125. `years` = #{years,jdbcType=INTEGER},
  126. </if>
  127. <if test="patentAmount != null">
  128. patent_amount = #{patentAmount,jdbcType=DECIMAL},
  129. </if>
  130. <if test="endDate != null">
  131. end_date = #{endDate,jdbcType=DATE},
  132. </if>
  133. <if test="status != null">
  134. `status` = #{status,jdbcType=INTEGER},
  135. </if>
  136. <if test="createTime != null">
  137. create_time = #{createTime,jdbcType=TIMESTAMP},
  138. </if>
  139. </set>
  140. where id = #{id,jdbcType=INTEGER}
  141. </update>
  142. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PatentPaymentDetails">
  143. <!--
  144. WARNING - @mbg.generated
  145. This element is automatically generated by MyBatis Generator, do not modify.
  146. This element was generated on Fri Aug 06 15:00:19 CST 2021.
  147. -->
  148. update patent_payment_details
  149. set pid = #{pid,jdbcType=INTEGER},
  150. `years` = #{years,jdbcType=INTEGER},
  151. patent_amount = #{patentAmount,jdbcType=DECIMAL},
  152. end_date = #{endDate,jdbcType=DATE},
  153. `status` = #{status,jdbcType=INTEGER},
  154. create_time = #{createTime,jdbcType=TIMESTAMP}
  155. where id = #{id,jdbcType=INTEGER}
  156. </update>
  157. <insert id="insertBatch" >
  158. insert into patent_payment_details ( pid, `years`,
  159. patent_amount, end_date, `status`
  160. )
  161. values
  162. <foreach collection="list" index="index" item="item" separator=",">
  163. ( #{item.pid,jdbcType=INTEGER}, #{item.years,jdbcType=INTEGER},
  164. #{item.patentAmount,jdbcType=DECIMAL}, #{item.endDate,jdbcType=DATE}, #{item.status,jdbcType=INTEGER}
  165. )
  166. </foreach>
  167. </insert>
  168. <select id="selectByPid" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  169. select
  170. <include refid="Base_Column_List" />
  171. from patent_payment_details
  172. where pid = #{pid,jdbcType=INTEGER}
  173. </select>
  174. </mapper>