| | |
| | | startTime,t.state,t.end_time,t.end_time endTime,t.owner_id,t.owner_id ownerId,t.user_id,t.user_id |
| | | userId,t.room_id,t.room_id roomId,bo.name ownerName,bo.link |
| | | from building_owner_room_rel t |
| | | left join building_owner bo on t.owner_id = bo.member_id and bo.status_cd = '0' |
| | | where 1 =1 |
| | | inner join building_owner bo on t.owner_id = bo.member_id and bo.status_cd = '0' |
| | | inner join building_room br on t.room_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join f_floor fl on bu.floor_id = fl.floor_id and fl.status_cd = '0' |
| | | <if test="ownerNameLike !=null and ownerNameLike != ''"> |
| | | and bo.`name` like concat('%',#{ownerNameLike},'%') |
| | | </if> |
| | |
| | | <if test="ownerId !=null and ownerId != ''"> |
| | | and t.owner_id= #{ownerId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | <!--<if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | </if>--> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | |
| | | <select id="queryOwnerRoomRelsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from building_owner_room_rel t |
| | | inner join building_owner bo on t.owner_id = bo.member_id and bo.status_cd = '0' |
| | | inner join building_room br on t.room_id = br.room_id and br.status_cd = '0' |
| | | inner join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | inner join f_floor fl on bu.floor_id = fl.floor_id and fl.status_cd = '0' |
| | | where 1 =1 |
| | | <if test="relId !=null and relId != ''"> |
| | | and t.rel_id= #{relId} |
| | |
| | | <if test="ownerId !=null and ownerId != ''"> |
| | | and t.owner_id= #{ownerId} |
| | | </if> |
| | | <if test="userId !=null and userId != ''"> |
| | | <!--<if test="userId !=null and userId != ''"> |
| | | and t.user_id= #{userId} |
| | | </if> |
| | | </if>--> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |