KwsDeviceMapper.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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.KwsDeviceMapper">
  4. <resultMap id="BaseResultMap" type="com.sckw.slope.detection.model.dos.mysql.KwsDevice">
  5. <!--@mbg.generated-->
  6. <!--@Table kws_device-->
  7. <id column="id" jdbcType="BIGINT" property="id" />
  8. <result column="attribute" jdbcType="INTEGER" property="attribute" />
  9. <result column="name" jdbcType="VARCHAR" property="name" />
  10. <result column="alias" jdbcType="VARCHAR" property="alias" />
  11. <result column="sn_code" jdbcType="VARCHAR" property="snCode" />
  12. <result column="model_id" jdbcType="BIGINT" property="modelId" />
  13. <result column="valid_time" jdbcType="TIMESTAMP" property="validTime" />
  14. <result column="secret_key" jdbcType="VARCHAR" property="secretKey" />
  15. <result column="interface" jdbcType="VARCHAR" property="interFace" />
  16. <result column="remark" jdbcType="VARCHAR" property="remark" />
  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="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  22. <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
  23. </resultMap>
  24. <sql id="Base_Column_List">
  25. <!--@mbg.generated-->
  26. id, `attribute`, `name`, `alias`, sn_code, model_id, valid_time, secret_key, inter_face,
  27. remark, `status`, create_by, create_time, update_by, update_time, del_flag
  28. </sql>
  29. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  30. <!--@mbg.generated-->
  31. select
  32. <include refid="Base_Column_List" />
  33. from kws_device
  34. where id = #{id,jdbcType=BIGINT}
  35. </select>
  36. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  37. <!--@mbg.generated-->
  38. delete from kws_device
  39. where id = #{id,jdbcType=BIGINT}
  40. </delete>
  41. <insert id="insert" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsDevice">
  42. <!--@mbg.generated-->
  43. insert into kws_device (id, `attribute`, `name`,
  44. `alias`, sn_code, model_id,
  45. valid_time, secret_key, interface,
  46. remark, `status`, create_by,
  47. create_time, update_by, update_time,
  48. del_flag)
  49. values (#{id,jdbcType=BIGINT}, #{attribute,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
  50. #{alias,jdbcType=VARCHAR}, #{snCode,jdbcType=VARCHAR}, #{modelId,jdbcType=BIGINT},
  51. #{validTime,jdbcType=TIMESTAMP}, #{secretKey,jdbcType=VARCHAR}, #{interFace,jdbcType=VARCHAR},
  52. #{remark,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{createBy,jdbcType=BIGINT},
  53. #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
  54. #{delFlag,jdbcType=TINYINT})
  55. </insert>
  56. <insert id="insertSelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsDevice">
  57. <!--@mbg.generated-->
  58. insert into kws_device
  59. <trim prefix="(" suffix=")" suffixOverrides=",">
  60. <if test="id != null">
  61. id,
  62. </if>
  63. <if test="attribute != null">
  64. `attribute`,
  65. </if>
  66. <if test="name != null">
  67. `name`,
  68. </if>
  69. <if test="alias != null">
  70. `alias`,
  71. </if>
  72. <if test="snCode != null">
  73. sn_code,
  74. </if>
  75. <if test="modelId != null">
  76. model_id,
  77. </if>
  78. <if test="validTime != null">
  79. valid_time,
  80. </if>
  81. <if test="secretKey != null">
  82. secret_key,
  83. </if>
  84. <if test="interFace != null">
  85. interface,
  86. </if>
  87. <if test="remark != null">
  88. remark,
  89. </if>
  90. <if test="status != null">
  91. `status`,
  92. </if>
  93. <if test="createBy != null">
  94. create_by,
  95. </if>
  96. <if test="createTime != null">
  97. create_time,
  98. </if>
  99. <if test="updateBy != null">
  100. update_by,
  101. </if>
  102. <if test="updateTime != null">
  103. update_time,
  104. </if>
  105. <if test="delFlag != null">
  106. del_flag,
  107. </if>
  108. </trim>
  109. <trim prefix="values (" suffix=")" suffixOverrides=",">
  110. <if test="id != null">
  111. #{id,jdbcType=BIGINT},
  112. </if>
  113. <if test="attribute != null">
  114. #{attribute,jdbcType=INTEGER},
  115. </if>
  116. <if test="name != null">
  117. #{name,jdbcType=VARCHAR},
  118. </if>
  119. <if test="alias != null">
  120. #{alias,jdbcType=VARCHAR},
  121. </if>
  122. <if test="snCode != null">
  123. #{snCode,jdbcType=VARCHAR},
  124. </if>
  125. <if test="modelId != null">
  126. #{modelId,jdbcType=BIGINT},
  127. </if>
  128. <if test="validTime != null">
  129. #{validTime,jdbcType=TIMESTAMP},
  130. </if>
  131. <if test="secretKey != null">
  132. #{secretKey,jdbcType=VARCHAR},
  133. </if>
  134. <if test="interFace != null">
  135. #{interFace,jdbcType=VARCHAR},
  136. </if>
  137. <if test="remark != null">
  138. #{remark,jdbcType=VARCHAR},
  139. </if>
  140. <if test="status != null">
  141. #{status,jdbcType=TINYINT},
  142. </if>
  143. <if test="createBy != null">
  144. #{createBy,jdbcType=BIGINT},
  145. </if>
  146. <if test="createTime != null">
  147. #{createTime,jdbcType=TIMESTAMP},
  148. </if>
  149. <if test="updateBy != null">
  150. #{updateBy,jdbcType=BIGINT},
  151. </if>
  152. <if test="updateTime != null">
  153. #{updateTime,jdbcType=TIMESTAMP},
  154. </if>
  155. <if test="delFlag != null">
  156. #{delFlag,jdbcType=TINYINT},
  157. </if>
  158. </trim>
  159. </insert>
  160. <update id="updateByPrimaryKeySelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsDevice">
  161. <!--@mbg.generated-->
  162. update kws_device
  163. <set>
  164. <if test="attribute != null">
  165. `attribute` = #{attribute,jdbcType=INTEGER},
  166. </if>
  167. <if test="name != null">
  168. `name` = #{name,jdbcType=VARCHAR},
  169. </if>
  170. <if test="alias != null">
  171. `alias` = #{alias,jdbcType=VARCHAR},
  172. </if>
  173. <if test="snCode != null">
  174. sn_code = #{snCode,jdbcType=VARCHAR},
  175. </if>
  176. <if test="modelId != null">
  177. model_id = #{modelId,jdbcType=BIGINT},
  178. </if>
  179. <if test="validTime != null">
  180. valid_time = #{validTime,jdbcType=TIMESTAMP},
  181. </if>
  182. <if test="secretKey != null">
  183. secret_key = #{secretKey,jdbcType=VARCHAR},
  184. </if>
  185. <if test="interFace != null">
  186. inter_face = #{interFace,jdbcType=VARCHAR},
  187. </if>
  188. <if test="remark != null">
  189. remark = #{remark,jdbcType=VARCHAR},
  190. </if>
  191. <if test="status != null">
  192. `status` = #{status,jdbcType=TINYINT},
  193. </if>
  194. <if test="createBy != null">
  195. create_by = #{createBy,jdbcType=BIGINT},
  196. </if>
  197. <if test="createTime != null">
  198. create_time = #{createTime,jdbcType=TIMESTAMP},
  199. </if>
  200. <if test="updateBy != null">
  201. update_by = #{updateBy,jdbcType=BIGINT},
  202. </if>
  203. <if test="updateTime != null">
  204. update_time = #{updateTime,jdbcType=TIMESTAMP},
  205. </if>
  206. <if test="delFlag != null">
  207. del_flag = #{delFlag,jdbcType=TINYINT},
  208. </if>
  209. </set>
  210. where id = #{id,jdbcType=BIGINT}
  211. </update>
  212. <update id="updateByPrimaryKey" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsDevice">
  213. <!--@mbg.generated-->
  214. update kws_device
  215. set `attribute` = #{attribute,jdbcType=INTEGER},
  216. `name` = #{name,jdbcType=VARCHAR},
  217. `alias` = #{alias,jdbcType=VARCHAR},
  218. sn_code = #{snCode,jdbcType=VARCHAR},
  219. model_id = #{modelId,jdbcType=BIGINT},
  220. valid_time = #{validTime,jdbcType=TIMESTAMP},
  221. secret_key = #{secretKey,jdbcType=VARCHAR},
  222. inter_face = #{interFace,jdbcType=VARCHAR},
  223. remark = #{remark,jdbcType=VARCHAR},
  224. `status` = #{status,jdbcType=TINYINT},
  225. create_by = #{createBy,jdbcType=BIGINT},
  226. create_time = #{createTime,jdbcType=TIMESTAMP},
  227. update_by = #{updateBy,jdbcType=BIGINT},
  228. update_time = #{updateTime,jdbcType=TIMESTAMP},
  229. del_flag = #{delFlag,jdbcType=TINYINT}
  230. where id = #{id,jdbcType=BIGINT}
  231. </update>
  232. </mapper>