| | |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="leaseTypes !=null "> |
| | | and t.lease_type in |
| | | <foreach collection="leaseTypes" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | |
| | | where t.status_cd = '0' |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="leaseTypes !=null "> |
| | | and t.lease_type in |
| | | <foreach collection="leaseTypes" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | |
| | | left join building_owner_room_rel borr on t.room_id = borr.room_id and borr.status_cd = '0' |
| | | left join building_owner bo on borr.owner_id = bo.member_id and bo.status_cd = '0' |
| | | WHERE 1 =1 |
| | | and t.status_cd = '0' |
| | | and u.unit_id = #{unitId} |
| | | and t.community_id= #{communityId} |
| | | order by CONVERT(t.layer,SIGNED),CONVERT(t.room_num,SIGNED) |