linwe
2023-12-26 f17a6dbf2290f73ced65e03121d0998d1416c959
src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -157,11 +157,10 @@
        LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_code
        LEFT JOIN jczz_grid_range jgr on jgr.house_code=jda.address_code
        LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id
        LEFT JOIN jczz_gridman jgm on jgm.grid_id=jg.id
        WHERE
        jh.is_deleted = 0
        <where>
        <if test="household.userId!=null">
            and jgm.user_id = #{household.userId}
                AND jg.id IN ( SELECT DISTINCT jgm.grid_id FROM jczz_gridman jgm WHERE jgm.user_id = #{household.userId}
                )
        </if>
        <if test="household.name!=null and household.name !=''">
            and jh.name like concat('%',#{household.name},'%')
@@ -196,7 +195,11 @@
        <if test="household.regionCode!=null and household.regionCode!=''">
            and jg.community_code like concat('%',#{household.regionCode},'%')
        </if>
            and jh.is_deleted = 0
        order by jh.create_time desc
        </where>
    </select>
    <!--查询房屋集合信息-->