linwei
2024-01-12 87c81cb045fb89a74901613405e6c4ccf4bd03bd
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -141,7 +141,7 @@
        left join jczz_grid_range jgr on jgr.house_code = jh.house_code
        left join jczz_grid jg on jg.id = jgr.grid_id and jg.is_deleted = 0
        left join blade_region br on br.code = jg.community_code
        where jh.is_deleted = 0
        <where>
        <if test="house.id != null ">and jh.id = #{house.id}</if>
        <if test="house.streetCode != null and house.streetCode != ''">
            and jda.town_street_code like concat('%',#{house.streetCode},'%')
@@ -174,6 +174,30 @@
        <if test="house.regionCode != null and house.regionCode !='' ">
            and jg.community_code like concat('%',#{house.regionCode},'%')
        </if>
            <if test="house.parentId != null ">
                and jh.house_code in (
                SELECT DISTINCT
                juhl.house_code
                FROM
                jczz_user_house_label juhl
                LEFT JOIN jczz_label jl ON juhl.label_id = jl.id
                WHERE
                juhl.lable_type = 2
                <if test="house.labelId != null ">
                    AND jl.id = #{house.labelId}
                </if>
                <if test="house.parentId != null ">
                    AND jl.parent_id = #{house.parentId}
                </if>
                AND juhl.label_id IS NOT NULL
                )
            </if>
            and jh.is_deleted = 0
            ORDER BY
            jh.update_time DESC
        </where>
    </select>
    <!--房屋自定义详情查询-->