BisInspMeetRoomDao.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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="cn.com.goldenwater.dcproj.dao.BisInspMeetRoomDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspMeetRoom" id="bisInspMeetRoomResultMap">
  5. <result property="persName" column="PERS_NAME"/>
  6. <result property="orgNm" column="ORG_NM"/>
  7. <result property="usOrgNm" column="US_ORG_NM"/>
  8. <result property="id" column="ID"/>
  9. <result property="meetingNumber" column="MEETING_NUMBER"/>
  10. <result property="meetingName" column="MEETING_NAME"/>
  11. <result property="startTime" column="START_TIME"/>
  12. <result property="endTime" column="END_TIME"/>
  13. <result property="maxParticipant" column="MAX_PARTICIPANT"/>
  14. <result property="requirePassword" column="REQUIRE_PASSWORD"/>
  15. <result property="inPassword" column="IN_PASSWORD"/>
  16. <result property="controlPassword" column="CONTROL_PASSWORD"/>
  17. <result property="autoMute" column="AUTO_MUTE"/>
  18. <result property="autoRecord" column="AUTO_RECORD"/>
  19. <result property="smartMuteperson" column="SMART_MUTEPERSON"/>
  20. <result property="shareUrl" column="SHARE_URL"/>
  21. <result property="usOrgId" column="US_ORG_ID"/>
  22. <result property="persId" column="PERS_ID"/>
  23. <result property="orgId" column="ORG_ID"/>
  24. <result property="intm" column="INTM"/>
  25. <result property="uptm" column="UPTM"/>
  26. <result property="flagValid" column="FLAG_VALID"/>
  27. </resultMap>
  28. <sql id="table_columns">
  29. PERS_NAME,
  30. ORG_NM,
  31. US_ORG_NM,
  32. ID,
  33. MEETING_NUMBER,
  34. MEETING_NAME,
  35. START_TIME,
  36. END_TIME,
  37. MAX_PARTICIPANT,
  38. REQUIRE_PASSWORD,
  39. IN_PASSWORD,
  40. CONTROL_PASSWORD,
  41. AUTO_MUTE,
  42. AUTO_RECORD,
  43. SMART_MUTEPERSON,
  44. SHARE_URL,
  45. US_ORG_ID,
  46. PERS_ID,
  47. ORG_ID,
  48. INTM,
  49. UPTM,
  50. FLAG_VALID
  51. </sql>
  52. <sql id="table_columns_bak">
  53. PERS_NAME,
  54. ORG_NM,
  55. US_ORG_NM,
  56. ID,
  57. MEETING_NUMBER,
  58. MEETING_NAME,
  59. START_TIME,
  60. END_TIME,
  61. MAX_PARTICIPANT,
  62. AUTO_MUTE,
  63. AUTO_RECORD,
  64. SMART_MUTEPERSON,
  65. SHARE_URL,
  66. US_ORG_ID,
  67. PERS_ID,
  68. ORG_ID,
  69. INTM,
  70. UPTM,
  71. FLAG_VALID
  72. </sql>
  73. <sql id="entity_properties">
  74. #{persName},
  75. #{orgNm},
  76. #{usOrgNm},
  77. #{id},
  78. #{meetingNumber},
  79. #{meetingName},
  80. #{startTime},
  81. #{endTime},
  82. #{maxParticipant},
  83. #{requirePassword},
  84. #{inPassword},
  85. #{controlPassword},
  86. #{autoMute},
  87. #{autoRecord},
  88. #{smartMuteperson},
  89. #{shareUrl},
  90. #{usOrgId},
  91. #{persId},
  92. #{orgId},
  93. #{intm},
  94. #{uptm},
  95. #{flagValid}
  96. </sql>
  97. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  98. <sql id="page_where">
  99. <trim prefix="where" prefixOverrides="and | or ">
  100. <if test="orgNm != null and orgNm != ''">and ORG_NM = #{orgNm}</if>
  101. <if test="usOrgNm != null and usOrgNm != ''">and US_ORG_NM = #{usOrgNm}</if>
  102. <if test="id != null and id != ''">and ID = #{id}</if>
  103. <if test="meetingNumber != null and meetingNumber != ''">and MEETING_NUMBER = #{meetingNumber}</if>
  104. <if test="meetingName != null and meetingName != ''">and MEETING_NAME = #{meetingName}</if>
  105. <if test="startTime != null">and START_TIME = #{startTime}</if>
  106. <if test="endTime != null">and END_TIME = #{endTime}</if>
  107. <if test="maxParticipant != null and maxParticipant != ''">and MAX_PARTICIPANT = #{maxParticipant}</if>
  108. <if test="requirePassword != null and requirePassword != ''">and REQUIRE_PASSWORD = #{requirePassword}</if>
  109. <if test="inPassword != null and inPassword != ''">and IN_PASSWORD = #{inPassword}</if>
  110. <if test="controlPassword != null and controlPassword != ''">and CONTROL_PASSWORD = #{controlPassword}</if>
  111. <if test="autoMute != null and autoMute != ''">and AUTO_MUTE = #{autoMute}</if>
  112. <if test="autoRecord != null and autoRecord != ''">and AUTO_RECORD = #{autoRecord}</if>
  113. <if test="smartMuteperson != null and smartMuteperson != ''">and SMART_MUTEPERSON = #{smartMuteperson}</if>
  114. <if test="shareUrl != null and shareUrl != ''">and SHARE_URL = #{shareUrl}</if>
  115. <if test="usOrgId != null and usOrgId != ''">and US_ORG_ID = #{usOrgId}</if>
  116. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  117. <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
  118. <if test="intm != null">and INTM = #{intm}</if>
  119. <if test="uptm != null">and UPTM = #{uptm}</if>
  120. <if test="flagValid != null and flagValid != ''">and FLAG_VALID = #{flagValid}</if>
  121. </trim>
  122. </sql>
  123. <select id="get" resultMap="bisInspMeetRoomResultMap" parameterType="String">
  124. select
  125. <include refid="table_columns"/>
  126. from BIS_INSP_MEET_ROOM where ID = #{id}
  127. </select>
  128. <select id="getBy" resultMap="bisInspMeetRoomResultMap">
  129. select
  130. <include refid="table_columns"/>
  131. from BIS_INSP_MEET_ROOM
  132. <include refid="page_where"/>
  133. </select>
  134. <select id="findAll" resultMap="bisInspMeetRoomResultMap">
  135. select
  136. <include refid="table_columns"/>
  137. from BIS_INSP_MEET_ROOM
  138. </select>
  139. <select id="findList" resultMap="bisInspMeetRoomResultMap">
  140. select
  141. <include refid="table_columns"/>
  142. from BIS_INSP_MEET_ROOM
  143. <include refid="page_where"/>
  144. </select>
  145. <select id="selectCount" resultType="int">
  146. select count(ID) from BIS_INSP_MEET_ROOM
  147. <include refid="page_where"/>
  148. </select>
  149. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspMeetRoom">
  150. insert into BIS_INSP_MEET_ROOM(
  151. <include refid="table_columns"/>
  152. )
  153. values (
  154. <include refid="entity_properties"/>
  155. )
  156. </insert>
  157. <delete id="delete" parameterType="java.lang.String">
  158. delete from BIS_INSP_MEET_ROOM where ID = #{id}
  159. </delete>
  160. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspMeetRoom">
  161. delete from BIS_INSP_MEET_ROOM
  162. <include refid="page_where"/>
  163. </delete>
  164. <update id="deleteInFlag" parameterType="java.lang.String">
  165. update BIS_INSP_MEET_ROOM set flag_valid = 0 where ID = #{id}
  166. </update>
  167. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspMeetRoom">
  168. update BIS_INSP_MEET_ROOM
  169. <trim prefix="set" suffixOverrides=",">
  170. <if test="orgNm != null and orgNm != ''">ORG_NM = #{orgNm},</if>
  171. <if test="usOrgNm != null and usOrgNm != ''">US_ORG_NM = #{usOrgNm},</if>
  172. <if test="id != null and id != ''">ID = #{id},</if>
  173. <if test="meetingNumber != null and meetingNumber != ''">MEETING_NUMBER = #{meetingNumber},</if>
  174. <if test="meetingName != null and meetingName != ''">MEETING_NAME = #{meetingName},</if>
  175. <if test="startTime != null">START_TIME = #{startTime},</if>
  176. <if test="endTime != null">END_TIME = #{endTime},</if>
  177. <if test="maxParticipant != null and maxParticipant != ''">MAX_PARTICIPANT = #{maxParticipant},</if>
  178. <if test="requirePassword != null and requirePassword != ''">REQUIRE_PASSWORD = #{requirePassword},</if>
  179. <if test="inPassword != null and inPassword != ''">IN_PASSWORD = #{inPassword},</if>
  180. <if test="controlPassword != null and controlPassword != ''">CONTROL_PASSWORD = #{controlPassword},</if>
  181. <if test="autoMute != null and autoMute != ''">AUTO_MUTE = #{autoMute},</if>
  182. <if test="autoRecord != null and autoRecord != ''">AUTO_RECORD = #{autoRecord},</if>
  183. <if test="smartMuteperson != null and smartMuteperson != ''">SMART_MUTEPERSON = #{smartMuteperson},</if>
  184. <if test="shareUrl != null and shareUrl != ''">SHARE_URL = #{shareUrl},</if>
  185. <if test="usOrgId != null and usOrgId != ''">US_ORG_ID = #{usOrgId},</if>
  186. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  187. <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
  188. <if test="intm != null">INTM = #{intm},</if>
  189. <if test="uptm != null">UPTM = #{uptm},</if>
  190. <if test="flagValid != null and flagValid != ''">FLAG_VALID = #{flagValid},</if>
  191. </trim>
  192. <where>ID = #{id}</where>
  193. </update>
  194. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspMeetRoom">
  195. update BIS_INSP_MEET_ROOM
  196. <trim prefix="set" suffixOverrides=",">
  197. <if test="orgNm != null and orgNm != ''">ORG_NM = #{orgNm},</if>
  198. <if test="usOrgNm != null and usOrgNm != ''">US_ORG_NM = #{usOrgNm},</if>
  199. <if test="id != null and id != ''">ID = #{id},</if>
  200. <if test="meetingNumber != null and meetingNumber != ''">MEETING_NUMBER = #{meetingNumber},</if>
  201. <if test="meetingName != null and meetingName != ''">MEETING_NAME = #{meetingName},</if>
  202. <if test="startTime != null">START_TIME = #{startTime},</if>
  203. <if test="endTime != null">END_TIME = #{endTime},</if>
  204. <if test="maxParticipant != null and maxParticipant != ''">MAX_PARTICIPANT = #{maxParticipant},</if>
  205. <if test="requirePassword != null and requirePassword != ''">REQUIRE_PASSWORD = #{requirePassword},</if>
  206. <if test="inPassword != null and inPassword != ''">IN_PASSWORD = #{inPassword},</if>
  207. <if test="controlPassword != null and controlPassword != ''">CONTROL_PASSWORD = #{controlPassword},</if>
  208. <if test="autoMute != null and autoMute != ''">AUTO_MUTE = #{autoMute},</if>
  209. <if test="autoRecord != null and autoRecord != ''">AUTO_RECORD = #{autoRecord},</if>
  210. <if test="smartMuteperson != null and smartMuteperson != ''">SMART_MUTEPERSON = #{smartMuteperson},</if>
  211. <if test="shareUrl != null and shareUrl != ''">SHARE_URL = #{shareUrl},</if>
  212. <if test="usOrgId != null and usOrgId != ''">US_ORG_ID = #{usOrgId},</if>
  213. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  214. <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
  215. <if test="intm != null">INTM = #{intm},</if>
  216. <if test="uptm != null">UPTM = #{uptm},</if>
  217. <if test="flagValid != null and flagValid != ''">FLAG_VALID = #{flagValid},</if>
  218. </trim>
  219. <include refid="page_where"/>
  220. </update>
  221. <!-- 其他自定义SQL -->
  222. <select id="getRoomByPersId" resultType="cn.com.goldenwater.dcproj.dto.BisInspMeetRoomDto">
  223. SELECT <include refid="table_columns_bak"/> FROM BIS_INSP_MEET_ROOM where 1=1
  224. <if test="persId != null and persId != ''">and pers_id=#{persId} or us_org_id=#{usOrgId}</if>
  225. </select>
  226. </mapper>