linwe
2023-11-24 8a28bb397d5743edf1da5930db0d6d0fdd86b35e
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
@@ -40,7 +40,7 @@
    <!--查询区域数据-街道-->
    <select id="getRegionListByGroupTwon" resultType="org.springblade.common.node.TreeNode" >
    <select id="getRegionListByGroupTwon" resultType="org.springblade.common.node.TreeStringNode" >
        select town_street_code as id,town_street_name as name from jczz_doorplate_address
        where 1=1
        <if test="houseParam.userId!=null and houseParam.userId!='' and houseParam.userId=='1726859808689696770'">
@@ -51,7 +51,7 @@
    </select>
    <!--查询区域数据-社区-->
    <select id="getRegionListByGroupNei" resultType="org.springblade.common.node.TreeNode" >
    <select id="getRegionListByGroupNei" resultType="org.springblade.common.node.TreeStringNode" >
        select nei_code as id,nei_name as name,town_street_code as parentId from jczz_doorplate_address
        where 1=1
        <if test="houseParam.userId!=null and houseParam.userId!='' and houseParam.userId=='1726859808689696770'">
@@ -62,7 +62,7 @@
    </select>
    <!--根据社区名称查询小区集合-->
    <select id="getDistrictList" resultType="org.springblade.common.node.TreeNode" >
    <select id="getDistrictList" resultType="org.springblade.common.node.TreeStringNode" >
        select aoi_code as id,aoi_name as name,1 as addressType from jczz_doorplate_address
        where 1=1
        and aoi_name !=''
@@ -120,7 +120,7 @@
    </select>
    <!--根据小区名称查询楼栋/商铺集合-->
    <select id="getBuildingList" resultType="org.springblade.common.node.TreeNode" >
    <select id="getBuildingList" resultType="org.springblade.common.node.TreeStringNode" >
        (
            select building_code as id,ifnull(building_name,'1栋') as name,1 as addressType from jczz_doorplate_address
            where 1=1
@@ -217,7 +217,7 @@
    </select>
    <!--根据社区查询街路巷集合-->
    <select id="getStreetRuList" resultType="org.springblade.common.node.TreeNode" >
    <select id="getStreetRuList" resultType="org.springblade.common.node.TreeStringNode" >
        select street_ru_code as id,street_ru_name as name,3 as addressType from jczz_doorplate_address
        where 1=1
        and aoi_code is null
@@ -346,7 +346,7 @@
    </select>
    <!--查询商超-->
    <select id="getPlaceRelList" resultType="org.springblade.common.node.TreeNode">
    <select id="getPlaceRelList" resultType="org.springblade.common.node.TreeStringNode">
        select building_name as id,building_name as name,4 as addressType from jczz_place_rel jpl
        join jczz_place jp on jpl.place_id = jp.id and jp.is_deleted = 0
        where jpl.is_deleted = 0
@@ -378,4 +378,37 @@
        </if>
    </select>
    <!--查询小区集合-->
    <select id="getAoiList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
        select nei_code,aoi_code,ifnull(aoi_name,sub_aoi) as aoi_name,x,y,address_name from  jczz_doorplate_address
        where 1=1
        <choose>
            <when test="list != null and list.size()>0">
                and id in
                <foreach collection="list" item="id" separator ="," open="("  close=")">
                    #{id}
                </foreach>
            </when>
            <otherwise>
                and id in ('')
            </otherwise>
        </choose>
    </select>
    <!--查询所有的地址表id集合-->
    <select id="getAoiCodeList" resultType="java.lang.Long">
        select
        max(id)
        from jczz_doorplate_address
        where aoi_code != "" and aoi_name !=""
        GROUP BY aoi_code
        union all
        (
        select
        max(id)
        from jczz_doorplate_address
        where aoi_code != "" and sub_aoi != ""
        group by aoi_code
        )
    </select>
</mapper>