Загрузка базы объектов...
            SELECT SQL_CALC_FOUND_ROWS p.*, 
                CONCAT(p.ads, ' ', p.ads_add) as ads,
                CONCAT(p.ads_rent, ' ', p.ads_add_rent) as ads_rent,
                CONCAT(st.socr, '. ', st.name) as street_name,
                CASE
                    WHEN us.phone != '' THEN us.phone
                    ELSE us.phone END as user_phone,  
                us.transfer_phone as user_transfer_phone,
                CASE
                    WHEN mg.phone != '' THEN mg.phone
                    ELSE mg.phone END as contact_phone,
                CONCAT('https://nasledie-don.ru/admin/images/users/', us.hash_file, '_p.', us.ext) as user_photo,
                CONCAT(us.surname, ' ', us.name, ' ', us.patronymic) as user_name  
            FROM business as p 
                LEFT JOIN attached_file AS at ON (at.idx = p.idx AND at.external = 1) 
                LEFT JOIN streets AS st ON st.id = p.street_adv
                LEFT JOIN users AS us ON us.id = p.owner
                LEFT JOIN users AS mg ON mg.id = CASE
                    WHEN us.transfer_phone = 0 THEN us.id
                    ELSE us.manager_id END
            WHERE 
                (p.owner = p.creator OR p.created != p.updated) AND p.status > 0 AND p.status != 2 AND at.idx > 0 AND p.coord_x_adv <> "" AND p.coord_y_adv <> "" AND (p.price > 0 OR p.price_rent > 0) AND CASE WHEN (p.cod = 61 AND p.reg = 0 AND p.cit = 1 AND p.loc = 0) THEN p.owner > 0 ELSE 1 = 1 END AND p.suspended_sale != 1 AND ((p.cod = 23 AND p.reg = 0 AND p.cit = 6 AND p.loc = 0 ))                               
            GROUP BY p.idx 
            ORDER BY p.updated DESC, p.price ASC 
            LIMIT 140, 20
            
{{marker.feature.properties.images_cnt}}
{{fields['geo.district'].lookup[marker.feature.properties.geo.parent_district]}}, {{fields['geo.district'].lookup[marker.feature.properties.geo.district]}}, {{fields['geo.street_name'].lookup[marker.feature.properties.geo.street_name]}}
{{marker.feature.properties.geo.loc_name}}, {{fields['geo.street_name'].lookup[marker.feature.properties.geo.street_name]}}
аренда
{{marker.feature.properties.price * 1000 | formatPrice:' '}} Р
{{marker.feature.properties.price_sqm * 1000 | formatPrice:' '}} Р2
До моря {{marker.feature.properties.tosea}} м. {{marker.feature.properties.ads}}
в аренду
{{marker.feature.properties.price_rent * 1000 | formatPrice:' '}} Р/месяц
{{marker.feature.properties.updated*1000 | dateCyr}}
Загрузка базы объектов...
            SELECT SQL_CALC_FOUND_ROWS p.*, 
                CONCAT(p.ads, ' ', p.ads_add) as ads,
                CONCAT(p.ads_rent, ' ', p.ads_add_rent) as ads_rent,
                CONCAT(st.socr, '. ', st.name) as street_name,
                CASE
                    WHEN us.phone != '' THEN us.phone
                    ELSE us.phone END as user_phone,  
                us.transfer_phone as user_transfer_phone,
                CASE
                    WHEN mg.phone != '' THEN mg.phone
                    ELSE mg.phone END as contact_phone,
                CONCAT('https://nasledie-don.ru/admin/images/users/', us.hash_file, '_p.', us.ext) as user_photo,
                CONCAT(us.surname, ' ', us.name, ' ', us.patronymic) as user_name  
            FROM business as p 
                LEFT JOIN attached_file AS at ON (at.idx = p.idx AND at.external = 1) 
                LEFT JOIN streets AS st ON st.id = p.street_adv
                LEFT JOIN users AS us ON us.id = p.owner
                LEFT JOIN users AS mg ON mg.id = CASE
                    WHEN us.transfer_phone = 0 THEN us.id
                    ELSE us.manager_id END
            WHERE 
                (p.owner = p.creator OR p.created != p.updated) AND p.status > 0 AND p.status != 2 AND at.idx > 0 AND p.coord_x_adv <> "" AND p.coord_y_adv <> "" AND (p.price > 0 OR p.price_rent > 0) AND CASE WHEN (p.cod = 61 AND p.reg = 0 AND p.cit = 1 AND p.loc = 0) THEN p.owner > 0 ELSE 1 = 1 END AND p.suspended_sale != 1 AND ((p.cod = 23 AND p.reg = 0 AND p.cit = 6 AND p.loc = 0 ))                               
            GROUP BY p.idx 
            ORDER BY p.updated DESC, p.price ASC 
            LIMIT 140, 20
            
{{marker.feature.properties.images_cnt}}
{{fields['geo.district'].lookup[marker.feature.properties.geo.parent_district]}}, {{fields['geo.district'].lookup[marker.feature.properties.geo.district]}}, {{fields['geo.street_name'].lookup[marker.feature.properties.geo.street_name]}}
{{marker.feature.properties.geo.loc_name}}, {{fields['geo.street_name'].lookup[marker.feature.properties.geo.street_name]}}
аренда
{{marker.feature.properties.price * 1000 | formatPrice:' '}} Р
за м2 {{marker.feature.properties.price_sqm * 1000 | formatPrice:' '}} Р2
в аренду {{marker.feature.properties.price_rent * 1000 | formatPrice:' '}} Р/месяц
до моря {{marker.feature.properties.tosea}} м.
{{marker.feature.properties.updated*1000 | dateCyr}}