linwe
2023-12-19 7b6ad0f09bfc5cd45a1aacfdfe55e69a02b9ff26
src/main/java/org/springblade/modules/place/mapper/PlaceMapper.xml
@@ -16,18 +16,20 @@
        select
        jp.*,
        bu.real_name as username,bu.phone as phone,
        bx.real_name as createUserName
         from jczz_place jp
        bx.real_name as createUserName,
        jpe.confirm_flag confirmFlag
        from jczz_place jp
        left join blade_user bu on bu.id = jp.principal_user_id and bu.is_deleted = 0
        left join blade_user bx on bx.id = jp.create_user and bx.is_deleted = 0
        LEFT JOIN jczz_place_ext jpe on jpe.place_id=jp.id
        left join (
            select a.* from jczz_place_poi_label a inner join
            (
            select place_id,max(id) as id from jczz_place_poi_label b group by place_id
            ) b on a.id = b.id
        select a.* from jczz_place_poi_label a inner join
        (
        select place_id,max(id) as id from jczz_place_poi_label b group by place_id
        ) b on a.id = b.id
        ) jppl on jppl.place_id = jp.id
        where jp.is_deleted = 0
        <if test="place.roleName!=null and place.roleName!=''">
        <if test="place.roleName!=null and place.roleName!='' and place.createUser!=null">
            <choose>
                <when test="place.roleName=='网格员'">
                    and
@@ -55,6 +57,12 @@
        <if test="place.principalPhone!=null and place.principalPhone!=''">
            and jp.principal_phone like concat('%',#{place.principalPhone},'%')
        </if>
        <if test="place.houseCode!=null and place.houseCode!=''">
            and jp.house_code = #{place.houseCode}
        </if>
        <if test="place.id!=null">
            and jp.id = #{place.id}
        </if>
        <if test="place.isPerfect==1">
            and
            (
@@ -72,6 +80,7 @@
            and bu.real_name != ""
            and bu.phone != ""
        </if>
        order by jpe.create_time desc
    </select>
    <!--查询场所集合信息-->