KwsAlarmDetailMapper.xml 6.9 KB

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