chengf
2026-03-11 b88a288f4f787b509463678e3cd9ccfa3f37014b
java110-db/src/main/resources/mapper/community/RoomV1ServiceDaoImplMapper.xml
@@ -8,9 +8,13 @@
    <!-- 保存房屋信息 add by wuxw 2018-07-03 -->
    <insert id="saveRoomInfo" parameterType="Map">
        insert into building_room(
        section,remark,room_sub_type,room_area,user_id,room_id,layer,fee_coefficient,built_up_area,room_num,unit_id,state,community_id,apartment,room_type,room_rent
        section,remark,room_sub_type,room_area,user_id,room_id,layer,fee_coefficient,built_up_area,
        room_num,unit_id,state,community_id,apartment,room_type,room_rent,door_room_num,property_type,property_address,house_certificate_no,
        road_name, buy_date, sell_date, sell_state, room_buyer, eoc, monthly_unit_price, property_fee_month
        ) values (
        #{section},#{remark},#{roomSubType},#{roomArea},#{userId},#{roomId},#{layer},#{feeCoefficient},#{builtUpArea},#{roomNum},#{unitId},#{state},#{communityId},#{apartment},#{roomType},#{roomRent}
        #{section},#{remark},#{roomSubType},#{roomArea},#{userId},#{roomId},#{layer},#{feeCoefficient},#{builtUpArea},#{roomNum},#{unitId},#{state},
        #{communityId},#{apartment},#{roomType},#{roomRent},#{doorRoomNum},#{propertyType},#{propertyAddress},#{houseCertificateNo},
        #{roadName},#{buyDate},#{sellDate},#{sellState},#{roomBuyer},#{eoc},#{monthlyUnitPrice},#{propertyFeeMonth}
        )
    </insert>
@@ -21,7 +25,7 @@
        roomSubType,t.room_area,t.room_area roomArea,t.user_id,t.user_id userId,t.room_id,t.room_id
        roomId,t.layer,t.fee_coefficient,t.fee_coefficient feeCoefficient,t.built_up_area,t.built_up_area
        builtUpArea,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.state,td.name stateName,t.community_id,t.community_id
        communityId,t.apartment,t.room_type,t.room_type roomType,t.room_rent,t.room_rent roomRent,f.floor_num floorNum,bu.unit_num unitNum
        communityId,t.apartment,t.room_type,t.room_type roomType,t.room_rent,t.room_rent roomRent,f.floor_num floorNum,f.floor_id floorId,bu.unit_num unitNum
        from building_room t
        left join  building_unit bu on t.unit_id = bu.unit_id and bu.status_cd = '0'
        left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0'
@@ -38,6 +42,15 @@
        </if>
        <if test="floorId !=null and floorId != ''">
            and f.floor_id= #{floorId}
        </if>
        <if test="doorRoomNum !=null and doorRoomNum != ''">
            and t.door_room_num= #{doorRoomNum}
        </if>
        <if test="propertyType !=null and propertyType != ''">
            and t.property_type= #{propertyType}
        </if>
        <if test="propertyAddress !=null and propertyAddress != ''">
            and t.property_address= #{propertyAddress}
        </if>
        <if test="floorNum !=null and floorNum != ''">
            and f.`floor_num`= #{floorNum}
@@ -60,8 +73,8 @@
        <if test="roomArea !=null and roomArea != ''">
            and t.room_area= #{roomArea}
        </if>
        <if test="userId !=null and userId != ''">
            and t.user_id= #{userId}
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="roomId !=null and roomId != ''">
            and t.room_id= #{roomId}
@@ -93,9 +106,7 @@
        <if test="state !=null and state != ''">
            and t.state= #{state}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="apartment !=null and apartment != ''">
            and t.apartment= #{apartment}
        </if>
@@ -105,7 +116,7 @@
        <if test="roomRent !=null and roomRent != ''">
            and t.room_rent= #{roomRent}
        </if>
        order by t.create_time desc
        order by f.floor_num,bu.unit_num,CONVERT(t.room_num, UNSIGNED)
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
@@ -164,6 +175,18 @@
        <if test="roomRent !=null and roomRent != ''">
            , t.room_rent= #{roomRent}
        </if>
        <if test="roomRent !=null and roomRent != ''">
            , t.door_room_num= #{doorRoomNum}
        </if>
        <if test="roomRent !=null and roomRent != ''">
            , t.property_type= #{propertyType}
        </if>
        <if test="roomRent !=null and roomRent != ''">
            , t.property_address= #{propertyAddress}
        </if>
        <if test="roomRent !=null and roomRent != ''">
            , t.house_certificate_no= #{houseCertificateNo}
        </if>
        where 1=1
        <if test="roomId !=null and roomId != ''">
            and t.room_id= #{roomId}