SysOrgExtendMapper.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.xunmei.system.mapper.SysOrgExtendMapper">
  6. <resultMap type="com.xunmei.system.api.domain.SysOrgExtend" id="SysOrgExtendResult">
  7. <result property="id" column="id"/>
  8. <result property="orgType" column="org_type"/>
  9. <result property="weatherAreaCode" column="weather_area_code"/>
  10. <result property="premisesArea" column="premises_area"/>
  11. <result property="ownership" column="ownership"/>
  12. <result property="outsideArea" column="outside_area"/>
  13. <result property="orgPhysicalDefenseConstructionId" column="org_physical_defense_construction_id"/>
  14. <result property="askari" column="askari"/>
  15. <result property="askariCertificate" column="askari_certificate"/>
  16. <result property="businessLibraryType" column="business_library
  17. _type"/>
  18. <result property="dutyMode" column="duty_mode"/>
  19. <result property="remoteControl" column="remote_control"/>
  20. <result property="selfServiceBank" column="self_service_bank"/>
  21. <result property="lobbyEquipment" column="lobby_equipment"/>
  22. <result property="wallPenetratingEquipment" column="wall_penetrating_equipment"/>
  23. <result property="bankPhysicalDefenseConstructionId" column="bank_physical_defense_construction_id"/>
  24. <result property="createTime" column="create_time"/>
  25. <result property="updateTime" column="update_time"/>
  26. <result property="createBy" column="create_by"/>
  27. <result property="updateBy" column="update_by"/>
  28. <result property="orgId" column="org_id"/>
  29. </resultMap>
  30. <sql id="selectSysOrgExtendVo">
  31. select id, org_type, weather_area_code, premises_area, ownership, outside_area, org_physical_defense_construction_id, askari, askari_certificate, business_library
  32. _type, duty_mode, remote_control, self_service_bank, lobby_equipment, wall_penetrating_equipment, bank_physical_defense_construction_id, create_time, update_time, create_by, update_by, org_id,hd_camera_count,total_camera_count
  33. from sys_org_extend
  34. </sql>
  35. <select id="selectSysOrgExtendList" parameterType="com.xunmei.system.api.domain.SysOrgExtend"
  36. resultMap="SysOrgExtendResult">
  37. <include refid="selectSysOrgExtendVo"/>
  38. <where>
  39. <if test="orgType != null ">
  40. and org_type = #{orgType}
  41. </if>
  42. <if test="weatherAreaCode != null and weatherAreaCode != ''">
  43. and weather_area_code = #{weatherAreaCode}
  44. </if>
  45. <if test="premisesArea != null ">
  46. and premises_area = #{premisesArea}
  47. </if>
  48. <if test="ownership != null ">
  49. and ownership = #{ownership}
  50. </if>
  51. <if test="outsideArea != null ">
  52. and outside_area = #{outsideArea}
  53. </if>
  54. <if test="orgPhysicalDefenseConstructionId != null ">
  55. and org_physical_defense_construction_id = #{orgPhysicalDefenseConstructionId}
  56. </if>
  57. <if test="askari != null ">
  58. and askari = #{askari}
  59. </if>
  60. <if test="askariCertificate != null and askariCertificate != ''">
  61. and askari_certificate = #{askariCertificate}
  62. </if>
  63. <if test="businessLibrary
  64. Type != null ">
  65. and business_library
  66. _type = #{businessLibrary
  67. Type}
  68. </if>
  69. <if test="dutyMode != null ">
  70. and duty_mode = #{dutyMode}
  71. </if>
  72. <if test="remoteControl != null ">
  73. and remote_control = #{remoteControl}
  74. </if>
  75. <if test="selfServiceBank != null ">
  76. and self_service_bank = #{selfServiceBank}
  77. </if>
  78. <if test="lobbyEquipment != null ">
  79. and lobby_equipment = #{lobbyEquipment}
  80. </if>
  81. <if test="wallPenetratingEquipment != null ">
  82. and wall_penetrating_equipment = #{wallPenetratingEquipment}
  83. </if>
  84. <if test="bankPhysicalDefenseConstructionId != null ">
  85. and bank_physical_defense_construction_id = #{bankPhysicalDefenseConstructionId}
  86. </if>
  87. <if test="orgId != null ">
  88. and org_id = #{orgId}
  89. </if>
  90. </where>
  91. </select>
  92. <select id="selectSysOrgExtendById" parameterType="Long"
  93. resultMap="SysOrgExtendResult">
  94. <include refid="selectSysOrgExtendVo"/>
  95. where id = #{id}
  96. </select>
  97. <insert id="insertSysOrgExtend" parameterType="com.xunmei.system.api.domain.SysOrgExtend" useGeneratedKeys="true" keyProperty="id">
  98. insert into sys_org_extend
  99. <trim prefix="(" suffix=")" suffixOverrides=",">
  100. <if test="orgType != null">org_type,
  101. </if>
  102. <if test="weatherAreaCode != null">weather_area_code,
  103. </if>
  104. <if test="premisesArea != null">premises_area,
  105. </if>
  106. <if test="ownership != null">ownership,
  107. </if>
  108. <if test="outsideArea != null">outside_area,
  109. </if>
  110. <if test="orgPhysicalDefenseConstructionId != null">org_physical_defense_construction_id,
  111. </if>
  112. <if test="askari != null">askari,
  113. </if>
  114. <if test="askariCertificate != null">askari_certificate,
  115. </if>
  116. <if test="businessLibrary
  117. Type != null">business_library
  118. _type,
  119. </if>
  120. <if test="dutyMode != null">duty_mode,
  121. </if>
  122. <if test="remoteControl != null">remote_control,
  123. </if>
  124. <if test="selfServiceBank != null">self_service_bank,
  125. </if>
  126. <if test="lobbyEquipment != null">lobby_equipment,
  127. </if>
  128. <if test="wallPenetratingEquipment != null">wall_penetrating_equipment,
  129. </if>
  130. <if test="bankPhysicalDefenseConstructionId != null">bank_physical_defense_construction_id,
  131. </if>
  132. <if test="createTime != null">create_time,
  133. </if>
  134. <if test="updateTime != null">update_time,
  135. </if>
  136. <if test="createBy != null">create_by,
  137. </if>
  138. <if test="updateBy != null">update_by,
  139. </if>
  140. <if test="orgId != null">org_id,
  141. </if>
  142. </trim>
  143. <trim prefix="values (" suffix=")" suffixOverrides=",">
  144. <if test="orgType != null">#{orgType},
  145. </if>
  146. <if test="weatherAreaCode != null">#{weatherAreaCode},
  147. </if>
  148. <if test="premisesArea != null">#{premisesArea},
  149. </if>
  150. <if test="ownership != null">#{ownership},
  151. </if>
  152. <if test="outsideArea != null">#{outsideArea},
  153. </if>
  154. <if test="orgPhysicalDefenseConstructionId != null">#{orgPhysicalDefenseConstructionId},
  155. </if>
  156. <if test="askari != null">#{askari},
  157. </if>
  158. <if test="askariCertificate != null">#{askariCertificate},
  159. </if>
  160. <if test="businessLibrary
  161. Type != null">#{businessLibrary
  162. Type},
  163. </if>
  164. <if test="dutyMode != null">#{dutyMode},
  165. </if>
  166. <if test="remoteControl != null">#{remoteControl},
  167. </if>
  168. <if test="selfServiceBank != null">#{selfServiceBank},
  169. </if>
  170. <if test="lobbyEquipment != null">#{lobbyEquipment},
  171. </if>
  172. <if test="wallPenetratingEquipment != null">#{wallPenetratingEquipment},
  173. </if>
  174. <if test="bankPhysicalDefenseConstructionId != null">#{bankPhysicalDefenseConstructionId},
  175. </if>
  176. <if test="createTime != null">#{createTime},
  177. </if>
  178. <if test="updateTime != null">#{updateTime},
  179. </if>
  180. <if test="createBy != null">#{createBy},
  181. </if>
  182. <if test="updateBy != null">#{updateBy},
  183. </if>
  184. <if test="orgId != null">#{orgId},
  185. </if>
  186. </trim>
  187. </insert>
  188. <update id="updateSysOrgExtend" parameterType="com.xunmei.system.api.domain.SysOrgExtend">
  189. update sys_org_extend
  190. <trim prefix="SET" suffixOverrides=",">
  191. <if test="orgType != null">org_type =
  192. #{orgType},
  193. </if>
  194. <if test="weatherAreaCode != null">weather_area_code =
  195. #{weatherAreaCode},
  196. </if>
  197. <if test="premisesArea != null">premises_area =
  198. #{premisesArea},
  199. </if>
  200. <if test="ownership != null">ownership =
  201. #{ownership},
  202. </if>
  203. <if test="outsideArea != null">outside_area =
  204. #{outsideArea},
  205. </if>
  206. <if test="orgPhysicalDefenseConstructionId != null">org_physical_defense_construction_id =
  207. #{orgPhysicalDefenseConstructionId},
  208. </if>
  209. <if test="askari != null">askari =
  210. #{askari},
  211. </if>
  212. <if test="askariCertificate != null">askari_certificate =
  213. #{askariCertificate},
  214. </if>
  215. <if test="businessLibrary
  216. Type != null">business_library
  217. _type =
  218. #{businessLibrary
  219. Type},
  220. </if>
  221. <if test="dutyMode != null">duty_mode =
  222. #{dutyMode},
  223. </if>
  224. <if test="remoteControl != null">remote_control =
  225. #{remoteControl},
  226. </if>
  227. <if test="selfServiceBank != null">self_service_bank =
  228. #{selfServiceBank},
  229. </if>
  230. <if test="lobbyEquipment != null">lobby_equipment =
  231. #{lobbyEquipment},
  232. </if>
  233. <if test="wallPenetratingEquipment != null">wall_penetrating_equipment =
  234. #{wallPenetratingEquipment},
  235. </if>
  236. <if test="bankPhysicalDefenseConstructionId != null">bank_physical_defense_construction_id =
  237. #{bankPhysicalDefenseConstructionId},
  238. </if>
  239. <if test="createTime != null">create_time =
  240. #{createTime},
  241. </if>
  242. <if test="updateTime != null">update_time =
  243. #{updateTime},
  244. </if>
  245. <if test="createBy != null">create_by =
  246. #{createBy},
  247. </if>
  248. <if test="updateBy != null">update_by =
  249. #{updateBy},
  250. </if>
  251. <if test="orgId != null">org_id =
  252. #{orgId},
  253. </if>
  254. </trim>
  255. where id = #{id}
  256. </update>
  257. <delete id="deleteSysOrgExtendById" parameterType="Long">
  258. delete
  259. from sys_org_extend where id = #{id}
  260. </delete>
  261. <delete id="deleteSysOrgExtendByIds" parameterType="String">
  262. delete from sys_org_extend where id in
  263. <foreach item="id" collection="array" open="(" separator="," close=")">
  264. #{id}
  265. </foreach>
  266. </delete>
  267. </mapper>