xiaogang
2023-11-02 62f2b98b64f6726ca7cb90cbfa996deaac4ffba9
java110-db/src/main/resources/mapper/user/OwnerRoomRelV1ServiceDaoImplMapper.xml
@@ -15,8 +15,10 @@
        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>
@@ -41,9 +43,9 @@
        <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>
@@ -96,6 +98,10 @@
    <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}
@@ -118,9 +124,9 @@
        <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>