IotUrlMapper.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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.middle.platform.manage.biz.mapper.IotUrlMapper">
  4. <resultMap id="BaseResultMap" type="com.middle.platform.manage.biz.domain.IotUrl">
  5. <!--@mbg.generated-->
  6. <!--@Table iot_url-->
  7. <id column="id" jdbcType="INTEGER" property="id" />
  8. <result column="product_id" jdbcType="INTEGER" property="productId" />
  9. <result column="url" jdbcType="VARCHAR" property="url" />
  10. <result column="type" jdbcType="TINYINT" property="type" />
  11. <result column="permission" jdbcType="TINYINT" property="permission" />
  12. <result column="remark" jdbcType="VARCHAR" property="remark" />
  13. <result column="create_by" jdbcType="INTEGER" property="createBy" />
  14. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  15. <result column="update_by" jdbcType="INTEGER" property="updateBy" />
  16. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  17. <result column="delete_time" jdbcType="TIMESTAMP" property="deleteTime" />
  18. <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
  19. </resultMap>
  20. <sql id="Base_Column_List">
  21. <!--@mbg.generated-->
  22. id, product_id, url, `type`, permission, remark, create_by, create_time, update_by,
  23. update_time, delete_time, del_flag
  24. </sql>
  25. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  26. <!--@mbg.generated-->
  27. select
  28. <include refid="Base_Column_List" />
  29. from iot_url
  30. where id = #{id,jdbcType=INTEGER}
  31. </select>
  32. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  33. <!--@mbg.generated-->
  34. delete from iot_url
  35. where id = #{id,jdbcType=INTEGER}
  36. </delete>
  37. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.middle.platform.manage.biz.domain.IotUrl" useGeneratedKeys="true">
  38. <!--@mbg.generated-->
  39. insert into iot_url (product_id, url, `type`,
  40. permission, remark, create_by,
  41. create_time, update_by, update_time,
  42. delete_time, del_flag)
  43. values (#{productId,jdbcType=INTEGER}, #{url,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT},
  44. #{permission,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}, #{createBy,jdbcType=INTEGER},
  45. #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP},
  46. #{deleteTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT})
  47. </insert>
  48. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.middle.platform.manage.biz.domain.IotUrl" useGeneratedKeys="true">
  49. <!--@mbg.generated-->
  50. insert into iot_url
  51. <trim prefix="(" suffix=")" suffixOverrides=",">
  52. <if test="productId != null">
  53. product_id,
  54. </if>
  55. <if test="url != null">
  56. url,
  57. </if>
  58. <if test="type != null">
  59. `type`,
  60. </if>
  61. <if test="permission != null">
  62. permission,
  63. </if>
  64. <if test="remark != null">
  65. remark,
  66. </if>
  67. <if test="createBy != null">
  68. create_by,
  69. </if>
  70. <if test="createTime != null">
  71. create_time,
  72. </if>
  73. <if test="updateBy != null">
  74. update_by,
  75. </if>
  76. <if test="updateTime != null">
  77. update_time,
  78. </if>
  79. <if test="deleteTime != null">
  80. delete_time,
  81. </if>
  82. <if test="delFlag != null">
  83. del_flag,
  84. </if>
  85. </trim>
  86. <trim prefix="values (" suffix=")" suffixOverrides=",">
  87. <if test="productId != null">
  88. #{productId,jdbcType=INTEGER},
  89. </if>
  90. <if test="url != null">
  91. #{url,jdbcType=VARCHAR},
  92. </if>
  93. <if test="type != null">
  94. #{type,jdbcType=TINYINT},
  95. </if>
  96. <if test="permission != null">
  97. #{permission,jdbcType=TINYINT},
  98. </if>
  99. <if test="remark != null">
  100. #{remark,jdbcType=VARCHAR},
  101. </if>
  102. <if test="createBy != null">
  103. #{createBy,jdbcType=INTEGER},
  104. </if>
  105. <if test="createTime != null">
  106. #{createTime,jdbcType=TIMESTAMP},
  107. </if>
  108. <if test="updateBy != null">
  109. #{updateBy,jdbcType=INTEGER},
  110. </if>
  111. <if test="updateTime != null">
  112. #{updateTime,jdbcType=TIMESTAMP},
  113. </if>
  114. <if test="deleteTime != null">
  115. #{deleteTime,jdbcType=TIMESTAMP},
  116. </if>
  117. <if test="delFlag != null">
  118. #{delFlag,jdbcType=TINYINT},
  119. </if>
  120. </trim>
  121. </insert>
  122. <update id="updateByPrimaryKeySelective" parameterType="com.middle.platform.manage.biz.domain.IotUrl">
  123. <!--@mbg.generated-->
  124. update iot_url
  125. <set>
  126. <if test="productId != null">
  127. product_id = #{productId,jdbcType=INTEGER},
  128. </if>
  129. <if test="url != null">
  130. url = #{url,jdbcType=VARCHAR},
  131. </if>
  132. <if test="type != null">
  133. `type` = #{type,jdbcType=TINYINT},
  134. </if>
  135. <if test="permission != null">
  136. permission = #{permission,jdbcType=TINYINT},
  137. </if>
  138. <if test="remark != null">
  139. remark = #{remark,jdbcType=VARCHAR},
  140. </if>
  141. <if test="createBy != null">
  142. create_by = #{createBy,jdbcType=INTEGER},
  143. </if>
  144. <if test="createTime != null">
  145. create_time = #{createTime,jdbcType=TIMESTAMP},
  146. </if>
  147. <if test="updateBy != null">
  148. update_by = #{updateBy,jdbcType=INTEGER},
  149. </if>
  150. <if test="updateTime != null">
  151. update_time = #{updateTime,jdbcType=TIMESTAMP},
  152. </if>
  153. <if test="deleteTime != null">
  154. delete_time = #{deleteTime,jdbcType=TIMESTAMP},
  155. </if>
  156. <if test="delFlag != null">
  157. del_flag = #{delFlag,jdbcType=TINYINT},
  158. </if>
  159. </set>
  160. where id = #{id,jdbcType=INTEGER}
  161. </update>
  162. <update id="updateByPrimaryKey" parameterType="com.middle.platform.manage.biz.domain.IotUrl">
  163. <!--@mbg.generated-->
  164. update iot_url
  165. set product_id = #{productId,jdbcType=INTEGER},
  166. url = #{url,jdbcType=VARCHAR},
  167. `type` = #{type,jdbcType=TINYINT},
  168. permission = #{permission,jdbcType=TINYINT},
  169. remark = #{remark,jdbcType=VARCHAR},
  170. create_by = #{createBy,jdbcType=INTEGER},
  171. create_time = #{createTime,jdbcType=TIMESTAMP},
  172. update_by = #{updateBy,jdbcType=INTEGER},
  173. update_time = #{updateTime,jdbcType=TIMESTAMP},
  174. delete_time = #{deleteTime,jdbcType=TIMESTAMP},
  175. del_flag = #{delFlag,jdbcType=TINYINT}
  176. where id = #{id,jdbcType=INTEGER}
  177. </update>
  178. </mapper>