RoomServiceDaoImplMapper.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  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="roomServiceDaoImpl">
  6. <!-- 保存小区房屋信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveBusinessRoomInfo" parameterType="Map">
  8. insert into business_building_room(
  9. unit_price,section,remark,user_id,room_id,layer,built_up_area,operate,room_num,unit_id,b_id,apartment,state
  10. ) values (
  11. #{unitPrice},#{section},#{remark},#{userId},#{roomId},#{layer},#{builtUpArea},#{operate},#{roomNum},#{unitId},#{bId},#{apartment},#{state}
  12. )
  13. </insert>
  14. <!-- 查询小区房屋信息(Business) add by wuxw 2018-07-03 -->
  15. <select id="getBusinessRoomInfo" parameterType="Map" resultType="Map">
  16. select t.unit_price,t.unit_price unitPrice,t.section,t.remark,t.user_id,t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.operate,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state
  17. from business_building_room t
  18. where 1 =1
  19. <if test="unitPrice !=null and unitPrice != ''">
  20. and t.unit_price= #{unitPrice}
  21. </if>
  22. <if test="section !=null and section != ''">
  23. and t.section= #{section}
  24. </if>
  25. <if test="remark !=null and remark != ''">
  26. and t.remark= #{remark}
  27. </if>
  28. <if test="userId !=null and userId != ''">
  29. and t.user_id= #{userId}
  30. </if>
  31. <if test="roomId !=null and roomId != ''">
  32. and t.room_id= #{roomId}
  33. </if>
  34. <if test="layer !=null and layer != ''">
  35. and t.layer= #{layer}
  36. </if>
  37. <if test="builtUpArea !=null and builtUpArea != ''">
  38. and t.built_up_area= #{builtUpArea}
  39. </if>
  40. <if test="operate !=null and operate != ''">
  41. and t.operate= #{operate}
  42. </if>
  43. <if test="roomNum !=null and roomNum != ''">
  44. and t.room_num= #{roomNum}
  45. </if>
  46. <if test="unitId !=null and unitId != ''">
  47. and t.unit_id= #{unitId}
  48. </if>
  49. <if test="bId !=null and bId != ''">
  50. and t.b_id= #{bId}
  51. </if>
  52. <if test="apartment !=null and apartment != ''">
  53. and t.apartment= #{apartment}
  54. </if>
  55. <if test="state !=null and state != ''">
  56. and t.state= #{state}
  57. </if>
  58. </select>
  59. <!-- 保存小区房屋信息至 instance表中 add by wuxw 2018-07-03 -->
  60. <insert id="saveRoomInfoInstance" parameterType="Map">
  61. insert into building_room(
  62. unit_price,section,status_cd,remark,user_id,room_id,layer,built_up_area,room_num,unit_id,b_id,apartment,state
  63. ) select t.unit_price,t.section,'0',t.remark,t.user_id,t.room_id,t.layer,t.built_up_area,t.room_num,t.unit_id,t.b_id,t.apartment,t.state from business_building_room t where 1=1
  64. <if test="unitPrice !=null and unitPrice != ''">
  65. and t.unit_price= #{unitPrice}
  66. </if>
  67. <if test="section !=null and section != ''">
  68. and t.section= #{section}
  69. </if>
  70. <if test="remark !=null and remark != ''">
  71. and t.remark= #{remark}
  72. </if>
  73. <if test="userId !=null and userId != ''">
  74. and t.user_id= #{userId}
  75. </if>
  76. <if test="roomId !=null and roomId != ''">
  77. and t.room_id= #{roomId}
  78. </if>
  79. <if test="layer !=null and layer != ''">
  80. and t.layer= #{layer}
  81. </if>
  82. <if test="builtUpArea !=null and builtUpArea != ''">
  83. and t.built_up_area= #{builtUpArea}
  84. </if>
  85. and t.operate= 'ADD'
  86. <if test="roomNum !=null and roomNum != ''">
  87. and t.room_num= #{roomNum}
  88. </if>
  89. <if test="unitId !=null and unitId != ''">
  90. and t.unit_id= #{unitId}
  91. </if>
  92. <if test="bId !=null and bId != ''">
  93. and t.b_id= #{bId}
  94. </if>
  95. <if test="apartment !=null and apartment != ''">
  96. and t.apartment= #{apartment}
  97. </if>
  98. <if test="state !=null and state != ''">
  99. and t.state= #{state}
  100. </if>
  101. </insert>
  102. <!-- 查询小区房屋信息 add by wuxw 2018-07-03 -->
  103. <select id="getRoomInfo" parameterType="Map" resultType="Map">
  104. select t.unit_price,t.unit_price unitPrice,t.section,t.status_cd,t.status_cd statusCd,t.remark,t.user_id,t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state
  105. from building_room t
  106. where 1 =1
  107. <if test="unitPrice !=null and unitPrice != ''">
  108. and t.unit_price= #{unitPrice}
  109. </if>
  110. <if test="section !=null and section != ''">
  111. and t.section= #{section}
  112. </if>
  113. <if test="statusCd !=null and statusCd != ''">
  114. and t.status_cd= #{statusCd}
  115. </if>
  116. <if test="remark !=null and remark != ''">
  117. and t.remark= #{remark}
  118. </if>
  119. <if test="userId !=null and userId != ''">
  120. and t.user_id= #{userId}
  121. </if>
  122. <if test="roomId !=null and roomId != ''">
  123. and t.room_id= #{roomId}
  124. </if>
  125. <if test="layer !=null and layer != ''">
  126. and t.layer= #{layer}
  127. </if>
  128. <if test="builtUpArea !=null and builtUpArea != ''">
  129. and t.built_up_area= #{builtUpArea}
  130. </if>
  131. <if test="roomNum !=null and roomNum != ''">
  132. and t.room_num= #{roomNum}
  133. </if>
  134. <if test="unitId !=null and unitId != ''">
  135. and t.unit_id= #{unitId}
  136. </if>
  137. <if test="bId !=null and bId != ''">
  138. and t.b_id= #{bId}
  139. </if>
  140. <if test="apartment !=null and apartment != ''">
  141. and t.apartment= #{apartment}
  142. </if>
  143. <if test="state !=null and state != ''">
  144. and t.state= #{state}
  145. </if>
  146. <if test="page != -1 and page != null">
  147. limit #{page},#{row}
  148. </if>
  149. </select>
  150. <!-- 修改小区房屋信息 add by wuxw 2018-07-03 -->
  151. <update id="updateRoomInfoInstance" parameterType="Map">
  152. update building_room t set t.status_cd = #{statusCd}
  153. <if test="newBId != null and newBId != ''">
  154. ,t.b_id = #{newBId}
  155. </if>
  156. <if test="unitPrice !=null and unitPrice != ''">
  157. , t.unit_price= #{unitPrice}
  158. </if>
  159. <if test="section !=null and section != ''">
  160. , t.section= #{section}
  161. </if>
  162. <if test="remark !=null and remark != ''">
  163. , t.remark= #{remark}
  164. </if>
  165. <if test="userId !=null and userId != ''">
  166. , t.user_id= #{userId}
  167. </if>
  168. <if test="layer !=null and layer != ''">
  169. , t.layer= #{layer}
  170. </if>
  171. <if test="builtUpArea !=null and builtUpArea != ''">
  172. , t.built_up_area= #{builtUpArea}
  173. </if>
  174. <if test="roomNum !=null and roomNum != ''">
  175. , t.room_num= #{roomNum}
  176. </if>
  177. <if test="unitId !=null and unitId != ''">
  178. , t.unit_id= #{unitId}
  179. </if>
  180. <if test="apartment !=null and apartment != ''">
  181. , t.apartment= #{apartment}
  182. </if>
  183. <if test="state !=null and state != ''">
  184. , t.state= #{state}
  185. </if>
  186. where 1=1 <if test="roomId !=null and roomId != ''">
  187. and t.room_id= #{roomId}
  188. </if>
  189. <if test="bId !=null and bId != ''">
  190. and t.b_id= #{bId}
  191. </if>
  192. </update>
  193. <!-- 查询小区房屋数量 add by wuxw 2018-07-03 -->
  194. <select id="queryRoomsCount" parameterType="Map" resultType="Map">
  195. select count(1) count
  196. from building_room t
  197. where 1 =1
  198. <if test="unitPrice !=null and unitPrice != ''">
  199. and t.unit_price= #{unitPrice}
  200. </if>
  201. <if test="section !=null and section != ''">
  202. and t.section= #{section}
  203. </if>
  204. <if test="statusCd !=null and statusCd != ''">
  205. and t.status_cd= #{statusCd}
  206. </if>
  207. <if test="remark !=null and remark != ''">
  208. and t.remark= #{remark}
  209. </if>
  210. <if test="userId !=null and userId != ''">
  211. and t.user_id= #{userId}
  212. </if>
  213. <if test="roomId !=null and roomId != ''">
  214. and t.room_id= #{roomId}
  215. </if>
  216. <if test="layer !=null and layer != ''">
  217. and t.layer= #{layer}
  218. </if>
  219. <if test="builtUpArea !=null and builtUpArea != ''">
  220. and t.built_up_area= #{builtUpArea}
  221. </if>
  222. <if test="roomNum !=null and roomNum != ''">
  223. and t.room_num= #{roomNum}
  224. </if>
  225. <if test="unitId !=null and unitId != ''">
  226. and t.unit_id= #{unitId}
  227. </if>
  228. <if test="bId !=null and bId != ''">
  229. and t.b_id= #{bId}
  230. </if>
  231. <if test="apartment !=null and apartment != ''">
  232. and t.apartment= #{apartment}
  233. </if>
  234. <if test="state !=null and state != ''">
  235. and t.state= #{state}
  236. </if>
  237. </select>
  238. <!-- 查询小区房屋数量 add by wuxw 2018-07-03 -->
  239. <select id="queryRoomsByCommunityIdCount" parameterType="Map" resultType="Map">
  240. select count(1) count
  241. FROM building_room t,s_community c,s_community_member cm,building_unit u,f_floor f
  242. WHERE 1 =1
  243. AND t.`unit_id` = u.`unit_id`
  244. AND u.`floor_id` = f.`floor_id`
  245. AND f.`floor_id` = cm.`member_id`
  246. AND cm.`community_id` = c.`community_id`
  247. AND cm.`member_type_cd` = '390001200004'
  248. AND c.`status_cd` = '0'
  249. AND cm.`status_cd` = '0'
  250. AND u.`status_cd` = '0'
  251. AND f.`status_cd` = '0'
  252. AND c.`community_id` = #{communityId}
  253. <if test="floorId !=null and floorId != ''">
  254. and f.`floor_id`= #{floorId}
  255. </if>
  256. <if test="unitPrice !=null and unitPrice != ''">
  257. and t.unit_price= #{unitPrice}
  258. </if>
  259. <if test="section !=null and section != ''">
  260. and t.section= #{section}
  261. </if>
  262. <if test="statusCd !=null and statusCd != ''">
  263. and t.status_cd= #{statusCd}
  264. </if>
  265. <if test="remark !=null and remark != ''">
  266. and t.remark= #{remark}
  267. </if>
  268. <if test="userId !=null and userId != ''">
  269. and t.user_id= #{userId}
  270. </if>
  271. <if test="roomId !=null and roomId != ''">
  272. and t.room_id= #{roomId}
  273. </if>
  274. <if test="layer !=null and layer != ''">
  275. and t.layer= #{layer}
  276. </if>
  277. <if test="builtUpArea !=null and builtUpArea != ''">
  278. and t.built_up_area= #{builtUpArea}
  279. </if>
  280. <if test="roomNum !=null and roomNum != ''">
  281. and t.room_num= #{roomNum}
  282. </if>
  283. <if test="unitId !=null and unitId != ''">
  284. and t.unit_id= #{unitId}
  285. </if>
  286. <if test="bId !=null and bId != ''">
  287. and t.b_id= #{bId}
  288. </if>
  289. <if test="apartment !=null and apartment != ''">
  290. and t.apartment= #{apartment}
  291. </if>
  292. <if test="state !=null and state != ''">
  293. and t.state= #{state}
  294. </if>
  295. </select>
  296. <!-- 查询小区房屋数量 add by wuxw 2018-07-03 -->
  297. <select id="queryRoomsWithOutSellByCommunityIdCount" parameterType="Map" resultType="Map">
  298. select
  299. count(1) count
  300. FROM
  301. building_room t,
  302. s_community c,
  303. s_community_member cm,
  304. building_unit u,
  305. f_floor f
  306. WHERE 1 =1
  307. AND t.`unit_id` = u.`unit_id`
  308. AND u.`floor_id` = f.`floor_id`
  309. AND f.`floor_id` = cm.`member_id`
  310. AND cm.`community_id` = c.`community_id`
  311. AND cm.`member_type_cd` = '390001200004'
  312. AND c.`status_cd` = '0'
  313. AND cm.`status_cd` = '0'
  314. AND u.`status_cd` = '0'
  315. AND f.`status_cd` = '0'
  316. AND c.`community_id` = #{communityId}
  317. <if test="floorId !=null and floorId != ''">
  318. and f.`floor_id`= #{floorId}
  319. </if>
  320. <if test="unitPrice !=null and unitPrice != ''">
  321. and t.unit_price= #{unitPrice}
  322. </if>
  323. <if test="section !=null and section != ''">
  324. and t.section= #{section}
  325. </if>
  326. <if test="statusCd !=null and statusCd != ''">
  327. and t.status_cd= #{statusCd}
  328. </if>
  329. <if test="remark !=null and remark != ''">
  330. and t.remark= #{remark}
  331. </if>
  332. <if test="userId !=null and userId != ''">
  333. and t.user_id= #{userId}
  334. </if>
  335. <if test="roomId !=null and roomId != ''">
  336. and t.room_id= #{roomId}
  337. </if>
  338. <if test="layer !=null and layer != ''">
  339. and t.layer= #{layer}
  340. </if>
  341. <if test="builtUpArea !=null and builtUpArea != ''">
  342. and t.built_up_area= #{builtUpArea}
  343. </if>
  344. <if test="roomNum !=null and roomNum != ''">
  345. and t.room_num= #{roomNum}
  346. </if>
  347. <if test="unitId !=null and unitId != ''">
  348. and t.unit_id= #{unitId}
  349. </if>
  350. <if test="bId !=null and bId != ''">
  351. and t.b_id= #{bId}
  352. </if>
  353. <if test="apartment !=null and apartment != ''">
  354. and t.apartment= #{apartment}
  355. </if>
  356. <if test="state !=null and state != ''">
  357. and t.state= #{state}
  358. </if>
  359. AND NOT EXISTS(
  360. SELECT 1 FROM building_owner_room_rel borr
  361. WHERE borr.`status_cd` = '0'
  362. AND borr.`room_id` = t.`room_id`
  363. )
  364. </select>
  365. <!-- 查询小区房屋信息 add by wuxw 2018-07-03 -->
  366. <select id="getRoomInfoWithOutSellByCommunityId" parameterType="Map" resultType="Map">
  367. SELECT t.unit_price,t.unit_price unitPrice,t.section,t.status_cd,t.status_cd statusCd,t.remark,t.user_id,
  368. t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num,
  369. t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum
  370. FROM building_room t,s_community c,s_community_member cm,building_unit u,f_floor f
  371. WHERE 1 =1
  372. AND t.`unit_id` = u.`unit_id`
  373. AND u.`floor_id` = f.`floor_id`
  374. AND f.`floor_id` = cm.`member_id`
  375. AND cm.`community_id` = c.`community_id`
  376. AND cm.`member_type_cd` = '390001200004'
  377. AND c.`status_cd` = '0'
  378. AND cm.`status_cd` = '0'
  379. AND u.`status_cd` = '0'
  380. AND f.`status_cd` = '0'
  381. AND c.`community_id` = #{communityId}
  382. <if test="floorId !=null and floorId != ''">
  383. and f.`floor_id`= #{floorId}
  384. </if>
  385. <if test="unitPrice !=null and unitPrice != ''">
  386. and t.unit_price= #{unitPrice}
  387. </if>
  388. <if test="section !=null and section != ''">
  389. and t.section= #{section}
  390. </if>
  391. <if test="statusCd !=null and statusCd != ''">
  392. and t.status_cd= #{statusCd}
  393. </if>
  394. <if test="remark !=null and remark != ''">
  395. and t.remark= #{remark}
  396. </if>
  397. <if test="userId !=null and userId != ''">
  398. and t.user_id= #{userId}
  399. </if>
  400. <if test="roomId !=null and roomId != ''">
  401. and t.room_id= #{roomId}
  402. </if>
  403. <if test="layer !=null and layer != ''">
  404. and t.layer= #{layer}
  405. </if>
  406. <if test="builtUpArea !=null and builtUpArea != ''">
  407. and t.built_up_area= #{builtUpArea}
  408. </if>
  409. <if test="roomNum !=null and roomNum != ''">
  410. and t.room_num= #{roomNum}
  411. </if>
  412. <if test="unitId !=null and unitId != ''">
  413. and t.unit_id= #{unitId}
  414. </if>
  415. <if test="bId !=null and bId != ''">
  416. and t.b_id= #{bId}
  417. </if>
  418. <if test="apartment !=null and apartment != ''">
  419. and t.apartment= #{apartment}
  420. </if>
  421. <if test="state !=null and state != ''">
  422. and t.state= #{state}
  423. </if>
  424. AND NOT EXISTS(
  425. SELECT 1 FROM building_owner_room_rel borr
  426. WHERE borr.`status_cd` = '0'
  427. AND borr.`room_id` = t.`room_id`
  428. )
  429. <if test="page != -1 and page != null">
  430. limit #{page},#{row}
  431. </if>
  432. </select>
  433. <!-- 查询小区房屋信息 add by wuxw 2018-07-03 -->
  434. <select id="getRoomInfoByCommunityId" parameterType="Map" resultType="Map">
  435. SELECT t.unit_price,t.unit_price unitPrice,t.section,t.status_cd,t.status_cd statusCd,t.remark,t.user_id,
  436. t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num,
  437. t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum
  438. FROM building_room t,s_community c,s_community_member cm,building_unit u,f_floor f
  439. WHERE 1 =1
  440. AND t.`unit_id` = u.`unit_id`
  441. AND u.`floor_id` = f.`floor_id`
  442. AND f.`floor_id` = cm.`member_id`
  443. AND cm.`community_id` = c.`community_id`
  444. AND cm.`member_type_cd` = '390001200004'
  445. AND c.`status_cd` = '0'
  446. AND cm.`status_cd` = '0'
  447. AND u.`status_cd` = '0'
  448. AND f.`status_cd` = '0'
  449. AND c.`community_id` = #{communityId}
  450. <if test="floorId !=null and floorId != ''">
  451. and f.`floor_id`= #{floorId}
  452. </if>
  453. <if test="unitPrice !=null and unitPrice != ''">
  454. and t.unit_price= #{unitPrice}
  455. </if>
  456. <if test="section !=null and section != ''">
  457. and t.section= #{section}
  458. </if>
  459. <if test="statusCd !=null and statusCd != ''">
  460. and t.status_cd= #{statusCd}
  461. </if>
  462. <if test="remark !=null and remark != ''">
  463. and t.remark= #{remark}
  464. </if>
  465. <if test="userId !=null and userId != ''">
  466. and t.user_id= #{userId}
  467. </if>
  468. <if test="roomId !=null and roomId != ''">
  469. and t.room_id= #{roomId}
  470. </if>
  471. <if test="layer !=null and layer != ''">
  472. and t.layer= #{layer}
  473. </if>
  474. <if test="builtUpArea !=null and builtUpArea != ''">
  475. and t.built_up_area= #{builtUpArea}
  476. </if>
  477. <if test="roomNum !=null and roomNum != ''">
  478. and t.room_num= #{roomNum}
  479. </if>
  480. <if test="unitId !=null and unitId != ''">
  481. and t.unit_id= #{unitId}
  482. </if>
  483. <if test="bId !=null and bId != ''">
  484. and t.b_id= #{bId}
  485. </if>
  486. <if test="apartment !=null and apartment != ''">
  487. and t.apartment= #{apartment}
  488. </if>
  489. <if test="state !=null and state != ''">
  490. and t.state= #{state}
  491. </if>
  492. <if test="page != -1 and page != null">
  493. limit #{page},#{row}
  494. </if>
  495. </select>
  496. <!-- 根据业主查询房屋信息 -->
  497. <select id="getRoomInfoByOwner" parameterType="Map" resultType="Map">
  498. SELECT
  499. t.unit_price,t.unit_price unitPrice,t.section,t.status_cd,t.status_cd statusCd,t.remark,t.user_id,
  500. t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num,
  501. t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum,f.`floor_num` floorNum
  502. FROM
  503. building_owner bo,building_room t,building_owner_room_rel borr,building_unit u,f_floor f
  504. WHERE
  505. bo.`owner_id` = borr.`owner_id`
  506. AND borr.`room_id` = t.`room_id`
  507. AND t.`unit_id` = u.`unit_id`
  508. AND u.`floor_id` = f.`floor_id`
  509. AND u.`status_cd` = '0'
  510. AND f.`status_cd` = '0'
  511. AND borr.`status_cd` = '0'
  512. AND t.`status_cd` = '0'
  513. AND bo.`status_cd` = '0'
  514. <if test="sex !=null ">
  515. and bo.sex= #{sex}
  516. </if>
  517. <if test="name !=null and name != ''">
  518. and bo.name= #{name}
  519. </if>
  520. <if test="link !=null and link != ''">
  521. and bo.link= #{link}
  522. </if>
  523. <if test="statusCd !=null and statusCd != ''">
  524. and bo.status_cd= #{statusCd}
  525. </if>
  526. <if test="remark !=null and remark != ''">
  527. and bo.remark= #{remark}
  528. </if>
  529. <if test="ownerId !=null and ownerId != ''">
  530. and bo.owner_id= #{ownerId}
  531. </if>
  532. <if test="bId !=null and bId != ''">
  533. and bo.b_id= #{bId}
  534. </if>
  535. <if test="userId !=null and userId != ''">
  536. and bo.user_id= #{userId}
  537. </if>
  538. <if test="age !=null and age != ''">
  539. and bo.age= #{age}
  540. </if>
  541. <if test="memberId !=null and memberId != ''">
  542. and bo.member_id= #{memberId}
  543. </if>
  544. <if test="ownerTypeCd !=null and ownerTypeCd != ''">
  545. and bo.owner_type_cd= #{ownerTypeCd}
  546. </if>
  547. </select>
  548. </mapper>