linwe
2023-12-18 ede1ff3b4482bb7e712d1a8563a56a66d349321c
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -76,6 +76,51 @@
    <!--房屋详情-->
    <resultMap id="houseAndHouseLabelMap" type="org.springblade.modules.house.vo.HouseVO" autoMapping="true">
        <result column="id" property="id"/>
        <result column="house_code" property="houseCode"/>
        <result column="district_code" property="districtCode"/>
        <result column="district_name" property="districtName"/>
        <result column="house_name" property="houseName"/>
        <result column="phone" property="phone"/>
        <result column="area" property="area"/>
        <result column="property_price" property="propertyPrice"/>
        <result column="service_due" property="serviceDue"/>
        <result column="floor" property="floor"/>
        <result column="building" property="building"/>
        <result column="unit" property="unit"/>
        <result column="room" property="room"/>
        <result column="building_no" property="buildingNo"/>
        <result column="image_urls" property="imageUrls"/>
        <result column="create_user" property="createUser"/>
        <result column="created_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="remark" property="remark"/>
        <result column="is_deleted" property="isDeleted"/>
        <collection property="userHouseLabelVOList" javaType="java.util.List" select="selectHouseLabelPage"  column="house_code"
                    ofType="org.springblade.modules.house.vo.UserHouseLabelVO" autoMapping="true">
        </collection>
    </resultMap>
    <select id="selectHouseLabelPage" resultType="org.springblade.modules.house.vo.HouseholdLabelVO">
        select
            id,
            house_code,
            label_id,
            label_name,
            color,
            remark cremark,
            user_id,
            lable_type,
            household_id
        from
            jczz_user_house_label
        where house_code = #{houseCode} and lable_type = 2
    </select>
    <!--房屋详情-->
    <resultMap id="housePageAndHouseLabelMap" type="org.springblade.modules.house.vo.HouseVO" autoMapping="true">
        <id property="id" column="id"/>
        <collection property="userHouseLabelVOList" javaType="java.util.List"
                    ofType="org.springblade.modules.house.vo.UserHouseLabelVO" autoMapping="true">
@@ -85,7 +130,7 @@
    </resultMap>
    <!--自定义分页列表-->
    <select id="selectHousePage" resultType="org.springblade.modules.house.vo.HouseVO">
    <select id="selectHousePage" resultMap="houseAndHouseLabelMap">
        select jh.*,concat(building," ",unit," ",room) as address from jczz_house jh
        left join jczz_doorplate_address jda on jda.address_code = jh.house_code
        where is_deleted = 0