KwsThresholdMapper.xml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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.sckw.slope.detection.dao.mysql.KwsThresholdMapper">
  4. <resultMap id="BaseResultMap" type="com.sckw.slope.detection.model.dos.mysql.KwsThreshold">
  5. <!--@mbg.generated-->
  6. <!--@Table kws_threshold-->
  7. <id column="id" jdbcType="BIGINT" property="id"/>
  8. <result column="device_id" jdbcType="BIGINT" property="deviceId"/>
  9. <result column="item_name" jdbcType="VARCHAR" property="itemName"/>
  10. <result column="level" jdbcType="INTEGER" property="level"/>
  11. <result column="company_id" jdbcType="VARCHAR" property="companyId"/>
  12. <result column="mountain_id" jdbcType="VARCHAR" property="mountainId"/>
  13. <result column="setting" jdbcType="VARCHAR" property="setting"/>
  14. <result column="max" jdbcType="VARCHAR" property="max"/>
  15. <result column="min" jdbcType="VARCHAR" property="min"/>
  16. <result column="phones" jdbcType="VARCHAR" property="phones"/>
  17. <result column="status" jdbcType="TINYINT" property="status"/>
  18. <result column="create_by" jdbcType="BIGINT" property="createBy"/>
  19. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  20. <result column="update_by" jdbcType="BIGINT" property="updateBy"/>
  21. <result column="create_name" jdbcType="VARCHAR" property="createName"/>
  22. <result column="update_name" jdbcType="VARCHAR" property="updateName"/>
  23. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  24. <result column="del_flag" jdbcType="TINYINT" property="delFlag"/>
  25. </resultMap>
  26. <sql id="Base_Column_List">
  27. <!--@mbg.generated-->
  28. id,
  29. device_id,
  30. setting,
  31. mountain_id,
  32. update_name,
  33. create_name,
  34. item_name,
  35. `level`,
  36. `max`,
  37. `min`,
  38. phones,
  39. `status`,
  40. create_by,
  41. update_name,
  42. create_time,
  43. update_by,
  44. update_time,
  45. del_flag,
  46. company_id
  47. </sql>
  48. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  49. <!--@mbg.generated-->
  50. select
  51. <include refid="Base_Column_List"/>
  52. from kws_threshold
  53. where id = #{id,jdbcType=BIGINT}
  54. </select>
  55. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  56. <!--@mbg.generated-->
  57. delete
  58. from kws_threshold
  59. where id = #{id,jdbcType=BIGINT}
  60. </delete>
  61. <insert id="insertSelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsThreshold">
  62. <!--@mbg.generated-->
  63. insert into kws_threshold
  64. <trim prefix="(" suffix=")" suffixOverrides=",">
  65. <if test="id != null">
  66. id,
  67. </if>
  68. <if test="deviceId != null">
  69. device_id,
  70. </if>
  71. <if test="itemName != null">
  72. item_name,
  73. </if>
  74. <if test="level != null">
  75. `level`,
  76. </if>
  77. <if test="max != null">
  78. `max`,
  79. </if>
  80. <if test="min != null">
  81. `min`,
  82. </if>
  83. <if test="phones != null">
  84. phones,
  85. </if>
  86. <if test="status != null">
  87. `status`,
  88. </if>
  89. <if test="createBy != null">
  90. create_by,
  91. </if>
  92. <if test="createTime != null">
  93. create_time,
  94. </if>
  95. <if test="updateBy != null">
  96. update_by,
  97. </if>
  98. <if test="updateTime != null">
  99. update_time,
  100. </if>
  101. <if test="delFlag != null">
  102. del_flag,
  103. </if>
  104. </trim>
  105. <trim prefix="values (" suffix=")" suffixOverrides=",">
  106. <if test="id != null">
  107. #{id,jdbcType=BIGINT},
  108. </if>
  109. <if test="deviceId != null">
  110. #{deviceId,jdbcType=BIGINT},
  111. </if>
  112. <if test="itemName != null">
  113. #{itemName,jdbcType=VARCHAR},
  114. </if>
  115. <if test="level != null">
  116. #{level,jdbcType=INTEGER},
  117. </if>
  118. <if test="max != null">
  119. #{max,jdbcType=VARCHAR},
  120. </if>
  121. <if test="min != null">
  122. #{min,jdbcType=VARCHAR},
  123. </if>
  124. <if test="phones != null">
  125. #{phones,jdbcType=VARCHAR},
  126. </if>
  127. <if test="status != null">
  128. #{status,jdbcType=TINYINT},
  129. </if>
  130. <if test="createBy != null">
  131. #{createBy,jdbcType=BIGINT},
  132. </if>
  133. <if test="createTime != null">
  134. #{createTime,jdbcType=TIMESTAMP},
  135. </if>
  136. <if test="updateBy != null">
  137. #{updateBy,jdbcType=BIGINT},
  138. </if>
  139. <if test="updateTime != null">
  140. #{updateTime,jdbcType=TIMESTAMP},
  141. </if>
  142. <if test="delFlag != null">
  143. #{delFlag,jdbcType=TINYINT},
  144. </if>
  145. </trim>
  146. </insert>
  147. <update id="updateByPrimaryKeySelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsThreshold">
  148. <!--@mbg.generated-->
  149. update kws_threshold
  150. <set>
  151. <if test="deviceId != null">
  152. device_id = #{deviceId,jdbcType=BIGINT},
  153. </if>
  154. <if test="itemName != null">
  155. item_name = #{itemName,jdbcType=VARCHAR},
  156. </if>
  157. <if test="level != null">
  158. `level` = #{level,jdbcType=INTEGER},
  159. </if>
  160. <if test="max != null">
  161. `max` = #{max,jdbcType=VARCHAR},
  162. </if>
  163. <if test="min != null">
  164. `min` = #{min,jdbcType=VARCHAR},
  165. </if>
  166. <if test="phones != null">
  167. phones = #{phones,jdbcType=VARCHAR},
  168. </if>
  169. <if test="status != null">
  170. `status` = #{status,jdbcType=TINYINT},
  171. </if>
  172. <if test="createBy != null">
  173. create_by = #{createBy,jdbcType=BIGINT},
  174. </if>
  175. <if test="createTime != null">
  176. create_time = #{createTime,jdbcType=TIMESTAMP},
  177. </if>
  178. <if test="updateBy != null">
  179. update_by = #{updateBy,jdbcType=BIGINT},
  180. </if>
  181. <if test="updateTime != null">
  182. update_time = #{updateTime,jdbcType=TIMESTAMP},
  183. </if>
  184. <if test="delFlag != null">
  185. del_flag = #{delFlag,jdbcType=TINYINT},
  186. </if>
  187. </set>
  188. where id = #{id,jdbcType=BIGINT}
  189. </update>
  190. <update id="updateByPrimaryKey" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsThreshold">
  191. <!--@mbg.generated-->
  192. update kws_threshold
  193. set device_id = #{deviceId,jdbcType=BIGINT},
  194. item_name = #{itemName,jdbcType=VARCHAR},
  195. `level` = #{level,jdbcType=INTEGER},
  196. `max` = #{max,jdbcType=VARCHAR},
  197. `min` = #{min,jdbcType=VARCHAR},
  198. phones = #{phones,jdbcType=VARCHAR},
  199. `status` = #{status,jdbcType=TINYINT},
  200. create_by = #{createBy,jdbcType=BIGINT},
  201. create_time = #{createTime,jdbcType=TIMESTAMP},
  202. update_by = #{updateBy,jdbcType=BIGINT},
  203. update_time = #{updateTime,jdbcType=TIMESTAMP},
  204. del_flag = #{delFlag,jdbcType=TINYINT}
  205. where id = #{id,jdbcType=BIGINT}
  206. </update>
  207. </mapper>