DemandOrderLogMapper.xml 4.0 KB

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