linwei
2024-01-23 5745a87f3a139ea2bbdaf4704978e4c151ecc45a
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -138,8 +138,7 @@
        br.town_name as townStreetName,br.name as neiName,
        jg.grid_name
        from jczz_house jh
        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 jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
        left join blade_region br on br.code = jg.community_code
        <where>
            <if test="house.id != null ">and jh.id = #{house.id}</if>
@@ -204,7 +203,7 @@
            </if>
            and jh.is_deleted = 0
            ORDER BY
            jh.update_time DESC
            jh.update_time desc,jh.id desc
        </where>
@@ -245,11 +244,10 @@
        select
        jh.*,
        jhl.id as cid,jhl.*,jhl.remark as cremark,
        br.code as neiCode,jg.id as gridId,br.town_code as streetCode
        br.code as neiCode,br.town_code as streetCode
        from jczz_house jh
        left join jczz_user_house_label jhl on jh.house_code = jhl.house_code and jhl.lable_type = 2
        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 jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0
        left join blade_region br on br.code = jg.community_code
        where jh.is_deleted = 0
        <if test="house.houseCode!=null and house.houseCode!=''">
@@ -392,7 +390,7 @@
            jczz_doorplate_address jda
            LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
            WHERE
            jc.res_police_user_id = #{userId})
            jc.res_police_user_id  like concat('%',#{userId},'%'))
            )
        </if>
        ) a
@@ -446,7 +444,7 @@
            jczz_doorplate_address jda
            LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
            WHERE
            jc.res_police_user_id = #{userId})
            jc.res_police_user_id like concat('%',#{userId},'%'))
            )
        </if>
        ) a
@@ -496,7 +494,7 @@
            jczz_doorplate_address jda
            LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
            WHERE
            jc.res_police_user_id = #{userId})
            jc.res_police_user_id like concat('%',#{userId},'%'))
            )
        </if>
    </select>
@@ -547,7 +545,7 @@
            jczz_doorplate_address jda
            LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
            WHERE
            jc.res_police_user_id = #{userId})
            jc.res_police_user_id like concat('%',#{userId},'%'))
            )
        </if>
        ) a