| | |
| | | |
| | | <select id="nearby" resultType="com.panzhihua.common.model.vos.community.rentingHouses.RentingHouseRegisterVO"> |
| | | select t.id,title, brn, construct_area, floor, orientation, decoration, label, address, monthly_rent_money, |
| | | `status`, detail_status, auth_status,t1.url |
| | | `status`, detail_status, auth_status,t1.url, |
| | | (POWER(MOD(ABS(longitude - #{nearbyDTO.longitude}),360),2) + POWER(ABS(latitude - #{nearbyDTO.latitude}),2)) AS distance |
| | | from renting_hourse_register t |
| | | LEFT JOIN (SELECT * FROM renting_hourse_file WHERE classification = 1 AND `type` = 1) t1 ON t.id = t1.ref_id |
| | | WHERE t.community_id = #{communityId} and t.status=2 and t.detail_status=3 |
| | | <if test="keyword !=null and keyword!=''"> |
| | | WHERE t.community_id = #{nearbyDTO.communityId} and t.status=2 and t.detail_status=3 |
| | | <if test="nearbyDTO.keyword !=null and nearbyDTO.keyword!=''"> |
| | | AND ( |
| | | village_name LIKE CONCAT('%', #{keyword}, '%') |
| | | OR address LIKE CONCAT('%', #{keyword}, '%') |
| | | village_name LIKE CONCAT('%', #{nearbyDTO.keyword}, '%') |
| | | OR address LIKE CONCAT('%', #{nearbyDTO.keyword}, '%') |
| | | ) |
| | | </if> |
| | | and (longitude BETWEEN ${minX} AND ${maxX}) |
| | | and (latitude BETWEEN ${minY} AND ${maxY}) group by t.id |
| | | and (latitude BETWEEN ${minY} AND ${maxY}) group by t.id order by distance ASC |
| | | </select> |
| | | |
| | | <select id="pageRentingHouseApplet" |