DeviceInfoPushConfigMapper.xml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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.huaxu.zoniot.dao.DeviceInfoPushConfigMapper">
  4. <resultMap id="BaseResultMap" type="com.huaxu.zoniot.entity.DeviceInfoPushConfig">
  5. <!--@mbg.generated-->
  6. <!--@Table sc_device_info_push_config-->
  7. <id column="id" jdbcType="INTEGER" property="id" />
  8. <result column="receiver_name" jdbcType="VARCHAR" property="receiverName" />
  9. <result column="push_method" jdbcType="VARCHAR" property="pushMethod" />
  10. <result column="push_customers" jdbcType="VARCHAR" property="pushCustomers" />
  11. <result column="push_communitys" jdbcType="VARCHAR" property="pushCommunitys" />
  12. <result column="push_buildings" jdbcType="VARCHAR" property="pushBuildings" />
  13. <result column="push_channels" jdbcType="VARCHAR" property="pushChannels" />
  14. <result column="push_device_types" jdbcType="VARCHAR" property="pushDeviceTypes" />
  15. <result column="push_url" jdbcType="VARCHAR" property="pushUrl" />
  16. <result column="period" jdbcType="VARCHAR" property="period" />
  17. <result column="status" jdbcType="INTEGER" property="status" />
  18. <result column="create_by" jdbcType="VARCHAR" property="createBy" />
  19. <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
  20. <result column="date_create" jdbcType="TIMESTAMP" property="dateCreate" />
  21. <result column="date_update" jdbcType="TIMESTAMP" property="dateUpdate" />
  22. </resultMap>
  23. <sql id="Base_Column_List">
  24. <!--@mbg.generated-->
  25. id, receiver_name, push_method, push_customers, push_communitys, push_buildings,
  26. push_channels, push_device_types, push_url, period, `status`, create_by, update_by,
  27. date_create, date_update
  28. </sql>
  29. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  30. <!--@mbg.generated-->
  31. select
  32. <include refid="Base_Column_List" />
  33. from sc_device_info_push_config
  34. where id = #{id,jdbcType=INTEGER}
  35. </select>
  36. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  37. <!--@mbg.generated-->
  38. delete from sc_device_info_push_config
  39. where id = #{id,jdbcType=INTEGER}
  40. </delete>
  41. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.huaxu.zoniot.entity.DeviceInfoPushConfig" useGeneratedKeys="true">
  42. <!--@mbg.generated-->
  43. insert into sc_device_info_push_config (receiver_name, push_method, push_customers,
  44. push_communitys, push_buildings, push_channels,
  45. push_device_types, push_url, period,
  46. `status`, create_by, update_by,
  47. date_create, date_update)
  48. values (#{receiverName,jdbcType=VARCHAR}, #{pushMethod,jdbcType=VARCHAR}, #{pushCustomers,jdbcType=VARCHAR},
  49. #{pushCommunitys,jdbcType=VARCHAR}, #{pushBuildings,jdbcType=VARCHAR}, #{pushChannels,jdbcType=VARCHAR},
  50. #{pushDeviceTypes,jdbcType=VARCHAR}, #{pushUrl,jdbcType=VARCHAR}, #{period,jdbcType=VARCHAR},
  51. #{status,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR},
  52. #{dateCreate,jdbcType=TIMESTAMP}, #{dateUpdate,jdbcType=TIMESTAMP})
  53. </insert>
  54. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.huaxu.zoniot.entity.DeviceInfoPushConfig" useGeneratedKeys="true">
  55. <!--@mbg.generated-->
  56. insert into sc_device_info_push_config
  57. <trim prefix="(" suffix=")" suffixOverrides=",">
  58. <if test="receiverName != null">
  59. receiver_name,
  60. </if>
  61. <if test="pushMethod != null">
  62. push_method,
  63. </if>
  64. <if test="pushCustomers != null">
  65. push_customers,
  66. </if>
  67. <if test="pushCommunitys != null">
  68. push_communitys,
  69. </if>
  70. <if test="pushBuildings != null">
  71. push_buildings,
  72. </if>
  73. <if test="pushChannels != null">
  74. push_channels,
  75. </if>
  76. <if test="pushDeviceTypes != null">
  77. push_device_types,
  78. </if>
  79. <if test="pushUrl != null">
  80. push_url,
  81. </if>
  82. <if test="period != null">
  83. period,
  84. </if>
  85. <if test="status != null">
  86. `status`,
  87. </if>
  88. <if test="createBy != null">
  89. create_by,
  90. </if>
  91. <if test="updateBy != null">
  92. update_by,
  93. </if>
  94. <if test="dateCreate != null">
  95. date_create,
  96. </if>
  97. <if test="dateUpdate != null">
  98. date_update,
  99. </if>
  100. </trim>
  101. <trim prefix="values (" suffix=")" suffixOverrides=",">
  102. <if test="receiverName != null">
  103. #{receiverName,jdbcType=VARCHAR},
  104. </if>
  105. <if test="pushMethod != null">
  106. #{pushMethod,jdbcType=VARCHAR},
  107. </if>
  108. <if test="pushCustomers != null">
  109. #{pushCustomers,jdbcType=VARCHAR},
  110. </if>
  111. <if test="pushCommunitys != null">
  112. #{pushCommunitys,jdbcType=VARCHAR},
  113. </if>
  114. <if test="pushBuildings != null">
  115. #{pushBuildings,jdbcType=VARCHAR},
  116. </if>
  117. <if test="pushChannels != null">
  118. #{pushChannels,jdbcType=VARCHAR},
  119. </if>
  120. <if test="pushDeviceTypes != null">
  121. #{pushDeviceTypes,jdbcType=VARCHAR},
  122. </if>
  123. <if test="pushUrl != null">
  124. #{pushUrl,jdbcType=VARCHAR},
  125. </if>
  126. <if test="period != null">
  127. #{period,jdbcType=VARCHAR},
  128. </if>
  129. <if test="status != null">
  130. #{status,jdbcType=INTEGER},
  131. </if>
  132. <if test="createBy != null">
  133. #{createBy,jdbcType=VARCHAR},
  134. </if>
  135. <if test="updateBy != null">
  136. #{updateBy,jdbcType=VARCHAR},
  137. </if>
  138. <if test="dateCreate != null">
  139. #{dateCreate,jdbcType=TIMESTAMP},
  140. </if>
  141. <if test="dateUpdate != null">
  142. #{dateUpdate,jdbcType=TIMESTAMP},
  143. </if>
  144. </trim>
  145. </insert>
  146. <update id="updateByPrimaryKeySelective" parameterType="com.huaxu.zoniot.entity.DeviceInfoPushConfig">
  147. <!--@mbg.generated-->
  148. update sc_device_info_push_config
  149. <set>
  150. <if test="receiverName != null">
  151. receiver_name = #{receiverName,jdbcType=VARCHAR},
  152. </if>
  153. <if test="pushMethod != null">
  154. push_method = #{pushMethod,jdbcType=VARCHAR},
  155. </if>
  156. <if test="pushCustomers != null">
  157. push_customers = #{pushCustomers,jdbcType=VARCHAR},
  158. </if>
  159. <if test="pushCommunitys != null">
  160. push_communitys = #{pushCommunitys,jdbcType=VARCHAR},
  161. </if>
  162. <if test="pushBuildings != null">
  163. push_buildings = #{pushBuildings,jdbcType=VARCHAR},
  164. </if>
  165. <if test="pushChannels != null">
  166. push_channels = #{pushChannels,jdbcType=VARCHAR},
  167. </if>
  168. <if test="pushDeviceTypes != null">
  169. push_device_types = #{pushDeviceTypes,jdbcType=VARCHAR},
  170. </if>
  171. <if test="pushUrl != null">
  172. push_url = #{pushUrl,jdbcType=VARCHAR},
  173. </if>
  174. <if test="period != null">
  175. period = #{period,jdbcType=VARCHAR},
  176. </if>
  177. <if test="status != null">
  178. `status` = #{status,jdbcType=INTEGER},
  179. </if>
  180. <if test="createBy != null">
  181. create_by = #{createBy,jdbcType=VARCHAR},
  182. </if>
  183. <if test="updateBy != null">
  184. update_by = #{updateBy,jdbcType=VARCHAR},
  185. </if>
  186. <if test="dateCreate != null">
  187. date_create = #{dateCreate,jdbcType=TIMESTAMP},
  188. </if>
  189. <if test="dateUpdate != null">
  190. date_update = #{dateUpdate,jdbcType=TIMESTAMP},
  191. </if>
  192. </set>
  193. where id = #{id,jdbcType=INTEGER}
  194. </update>
  195. <update id="updateByPrimaryKey" parameterType="com.huaxu.zoniot.entity.DeviceInfoPushConfig">
  196. <!--@mbg.generated-->
  197. update sc_device_info_push_config
  198. set receiver_name = #{receiverName,jdbcType=VARCHAR},
  199. push_method = #{pushMethod,jdbcType=VARCHAR},
  200. push_customers = #{pushCustomers,jdbcType=VARCHAR},
  201. push_communitys = #{pushCommunitys,jdbcType=VARCHAR},
  202. push_buildings = #{pushBuildings,jdbcType=VARCHAR},
  203. push_channels = #{pushChannels,jdbcType=VARCHAR},
  204. push_device_types = #{pushDeviceTypes,jdbcType=VARCHAR},
  205. push_url = #{pushUrl,jdbcType=VARCHAR},
  206. period = #{period,jdbcType=VARCHAR},
  207. `status` = #{status,jdbcType=INTEGER},
  208. create_by = #{createBy,jdbcType=VARCHAR},
  209. update_by = #{updateBy,jdbcType=VARCHAR},
  210. date_create = #{dateCreate,jdbcType=TIMESTAMP},
  211. date_update = #{dateUpdate,jdbcType=TIMESTAMP}
  212. where id = #{id,jdbcType=INTEGER}
  213. </update>
  214. <select id="findConfigById" resultMap="BaseResultMap">
  215. select
  216. <include refid="Base_Column_List" />
  217. from
  218. sc_device_info_push_config
  219. where status = 1
  220. and id = #{configId}
  221. </select>
  222. </mapper>