DeviceValveRecordMapper.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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.bz.smart_city.dao.DeviceValveRecordMapper">
  4. <resultMap id="BaseResultMap" type="com.bz.smart_city.entity.DeviceValveRecord">
  5. <!--@mbg.generated-->
  6. <!--@Table sc_device_valve_record-->
  7. <id column="id" property="id" />
  8. <result column="device_id" property="deviceId" />
  9. <result column="send_valve_status" property="sendValveStatus" />
  10. <result column="send_status" property="sendStatus" />
  11. <result column="command_id" property="commandId" />
  12. <result column="command_status" property="commandStatus" />
  13. <result column="remark" property="remark" />
  14. <result column="status" property="status" />
  15. <result column="date_create" property="dateCreate" />
  16. <result column="date_update" property="dateUpdate" />
  17. <result column="create_by" property="createBy" />
  18. <result column="update_by" property="updateBy" />
  19. </resultMap>
  20. <sql id="Base_Column_List">
  21. <!--@mbg.generated-->
  22. id, device_id, send_valve_status, send_status, command_id, command_status, remark,
  23. `status`, date_create, date_update, create_by, update_by
  24. </sql>
  25. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bz.smart_city.entity.DeviceValveRecord" useGeneratedKeys="true">
  26. <!--@mbg.generated-->
  27. insert into sc_device_valve_record
  28. <trim prefix="(" suffix=")" suffixOverrides=",">
  29. <if test="deviceId != null">
  30. device_id,
  31. </if>
  32. <if test="sendValveStatus != null">
  33. send_valve_status,
  34. </if>
  35. <if test="sendStatus != null">
  36. send_status,
  37. </if>
  38. <if test="commandId != null">
  39. command_id,
  40. </if>
  41. <if test="commandStatus != null">
  42. command_status,
  43. </if>
  44. <if test="remark != null">
  45. remark,
  46. </if>
  47. <if test="status != null">
  48. `status`,
  49. </if>
  50. <if test="dateCreate != null">
  51. date_create,
  52. </if>
  53. <if test="dateUpdate != null">
  54. date_update,
  55. </if>
  56. <if test="createBy != null">
  57. create_by,
  58. </if>
  59. <if test="updateBy != null">
  60. update_by,
  61. </if>
  62. </trim>
  63. <trim prefix="values (" suffix=")" suffixOverrides=",">
  64. <if test="deviceId != null">
  65. #{deviceId},
  66. </if>
  67. <if test="sendValveStatus != null">
  68. #{sendValveStatus},
  69. </if>
  70. <if test="sendStatus != null">
  71. #{sendStatus},
  72. </if>
  73. <if test="commandId != null">
  74. #{commandId},
  75. </if>
  76. <if test="commandStatus != null">
  77. #{commandStatus},
  78. </if>
  79. <if test="remark != null">
  80. #{remark},
  81. </if>
  82. <if test="status != null">
  83. #{status},
  84. </if>
  85. <if test="dateCreate != null">
  86. #{dateCreate},
  87. </if>
  88. <if test="dateUpdate != null">
  89. #{dateUpdate},
  90. </if>
  91. <if test="createBy != null">
  92. #{createBy},
  93. </if>
  94. <if test="updateBy != null">
  95. #{updateBy},
  96. </if>
  97. </trim>
  98. </insert>
  99. <update id="updateByPrimaryKeySelective" parameterType="com.bz.smart_city.entity.DeviceValveRecord">
  100. <!--@mbg.generated-->
  101. update sc_device_valve_record
  102. <set>
  103. <if test="deviceId != null">
  104. device_id = #{deviceId},
  105. </if>
  106. <if test="sendValveStatus != null">
  107. send_valve_status = #{sendValveStatus},
  108. </if>
  109. <if test="sendStatus != null">
  110. send_status = #{sendStatus},
  111. </if>
  112. <if test="commandId != null">
  113. command_id = #{commandId},
  114. </if>
  115. <if test="commandStatus != null">
  116. command_status = #{commandStatus},
  117. </if>
  118. <if test="remark != null">
  119. remark = #{remark},
  120. </if>
  121. <if test="status != null">
  122. `status` = #{status},
  123. </if>
  124. <if test="dateCreate != null">
  125. date_create = #{dateCreate},
  126. </if>
  127. <if test="dateUpdate != null">
  128. date_update = #{dateUpdate},
  129. </if>
  130. <if test="createBy != null">
  131. create_by = #{createBy},
  132. </if>
  133. <if test="updateBy != null">
  134. update_by = #{updateBy},
  135. </if>
  136. </set>
  137. where id = #{id}
  138. </update>
  139. </mapper>