InvoiceLogMapper.xml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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.InvoiceLogMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.InvoiceLog">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="invoice_id" jdbcType="INTEGER" property="invoiceId" />
  7. <result column="status" jdbcType="INTEGER" property="status" />
  8. <result column="aid" jdbcType="VARCHAR" property="aid" />
  9. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  10. </resultMap>
  11. <sql id="Base_Column_List">
  12. id, invoice_id, `status`, aid, create_time
  13. </sql>
  14. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  15. select
  16. <include refid="Base_Column_List" />
  17. from invoice_log
  18. where id = #{id,jdbcType=INTEGER}
  19. </select>
  20. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  21. delete from invoice_log
  22. where id = #{id,jdbcType=INTEGER}
  23. </delete>
  24. <insert id="insert" parameterType="com.goafanti.common.model.InvoiceLog">
  25. insert into invoice_log (id, invoice_id, `status`,
  26. aid, create_time)
  27. values (#{id,jdbcType=INTEGER}, #{invoiceId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
  28. #{aid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
  29. </insert>
  30. <insert id="insertSelective" parameterType="com.goafanti.common.model.InvoiceLog" >
  31. insert into invoice_log
  32. <trim prefix="(" suffix=")" suffixOverrides=",">
  33. <if test="id != null">
  34. id,
  35. </if>
  36. <if test="invoiceId != null">
  37. invoice_id,
  38. </if>
  39. <if test="status != null">
  40. `status`,
  41. </if>
  42. <if test="aid != null">
  43. aid,
  44. </if>
  45. <if test="createTime != null">
  46. create_time,
  47. </if>
  48. </trim>
  49. <trim prefix="values (" suffix=")" suffixOverrides=",">
  50. <if test="id != null">
  51. #{id,jdbcType=INTEGER},
  52. </if>
  53. <if test="invoiceId != null">
  54. #{invoiceId,jdbcType=INTEGER},
  55. </if>
  56. <if test="status != null">
  57. #{status,jdbcType=INTEGER},
  58. </if>
  59. <if test="aid != null">
  60. #{aid,jdbcType=VARCHAR},
  61. </if>
  62. <if test="createTime != null">
  63. #{createTime,jdbcType=TIMESTAMP},
  64. </if>
  65. </trim>
  66. </insert>
  67. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.InvoiceLog">
  68. update invoice_log
  69. <set>
  70. <if test="invoiceId != null">
  71. invoice_id = #{invoiceId,jdbcType=INTEGER},
  72. </if>
  73. <if test="status != null">
  74. `status` = #{status,jdbcType=INTEGER},
  75. </if>
  76. <if test="aid != null">
  77. aid = #{aid,jdbcType=VARCHAR},
  78. </if>
  79. <if test="createTime != null">
  80. create_time = #{createTime,jdbcType=TIMESTAMP},
  81. </if>
  82. </set>
  83. where id = #{id,jdbcType=INTEGER}
  84. </update>
  85. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.InvoiceLog">
  86. update invoice_log
  87. set invoice_id = #{invoiceId,jdbcType=INTEGER},
  88. `status` = #{status,jdbcType=INTEGER},
  89. aid = #{aid,jdbcType=VARCHAR},
  90. create_time = #{createTime,jdbcType=TIMESTAMP}
  91. where id = #{id,jdbcType=INTEGER}
  92. </update>
  93. </mapper>