From cc23049bd108fb9bb80715c219079ffa5719c5d6 Mon Sep 17 00:00:00 2001 From: JaeHyeon Lee Date: Sun, 12 Nov 2023 21:20:36 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20Shelter=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=9A=94=EA=B5=AC=EC=82=AC=ED=95=AD=20=EC=A0=81=EC=9A=A9=20(#5?= =?UTF-8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Feat(#40) : get admin-address info api * Feat(#40) : add id field to GetAddressResponse dto * Feat(#40) : implement get address-info api * Feat(#40) : add facilityFullName Field to response * Feat(#48): shelter 조회 반경을 1.5 km 에서 1.0 km 으로 변경 --- .../domain/shelter/controller/ShelterController.java | 4 ++-- .../domain/shelter/repository/ShelterRepository.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/numberone/backend/domain/shelter/controller/ShelterController.java b/src/main/java/com/numberone/backend/domain/shelter/controller/ShelterController.java index 85d0ae24..b0c8a2ba 100644 --- a/src/main/java/com/numberone/backend/domain/shelter/controller/ShelterController.java +++ b/src/main/java/com/numberone/backend/domain/shelter/controller/ShelterController.java @@ -37,7 +37,7 @@ public class ShelterController { (주의🔥) 대피소가 하나도 없는 경우에는 NotFound 예외를 터뜨립니다. - distance 는 미터(m) 단위이며 1500 m 이내 대피소만 검색합니다. + distance 는 미터(m) 단위이며 1000 m 이내 대피소만 검색합니다. 검색 결과가 0 개인 경우, NotFound 예외를 터뜨립니다. @@ -72,7 +72,7 @@ public ResponseEntity getNearestAnyShelter( 최대 10 개 까지만 반환합니다. - distance 는 미터(m) 단위이며 1500 m 이내 대피소만 검색합니다. + distance 는 미터(m) 단위이며 1000 m 이내 대피소만 검색합니다. access token 을 헤더에 담아서 요청해주세요. """) diff --git a/src/main/java/com/numberone/backend/domain/shelter/repository/ShelterRepository.java b/src/main/java/com/numberone/backend/domain/shelter/repository/ShelterRepository.java index 0910c815..c344d803 100644 --- a/src/main/java/com/numberone/backend/domain/shelter/repository/ShelterRepository.java +++ b/src/main/java/com/numberone/backend/domain/shelter/repository/ShelterRepository.java @@ -19,7 +19,7 @@ public interface ShelterRepository extends JpaRepository, CustomS " FROM shelter " + " WHERE shelter.longitude != 0 and shelter.latitude != 0 " + " AND shelter.status = 'OPEN' " + - " HAVING distance <= 1500 " + + " HAVING distance <= 1000 " + " ORDER BY distance " + " LIMIT 10", nativeQuery = true) @@ -32,7 +32,7 @@ public interface ShelterRepository extends JpaRepository, CustomS " FROM shelter " + " WHERE shelter.longitude != 0 and shelter.latitude != 0 " + " AND shelter.status = 'OPEN' " + - " HAVING distance <= 1500 " + + " HAVING distance <= 1000 " + " ORDER BY distance " + " LIMIT 1", nativeQuery = true) @@ -45,7 +45,7 @@ public interface ShelterRepository extends JpaRepository, CustomS " FROM shelter " + " WHERE (shelter.longitude != 0 and shelter.latitude != 0) and shelter.shelter_type = :shelter_type " + " AND shelter.status = 'OPEN' " + - " HAVING distance <= 1500 " + + " HAVING distance <= 1000 " + " ORDER BY distance " + " LIMIT 10", nativeQuery = true) @@ -58,7 +58,7 @@ public interface ShelterRepository extends JpaRepository, CustomS " FROM shelter " + " WHERE shelter.longitude != 0 and shelter.latitude != 0 and shelter.shelter_type = :shelter_type " + " AND shelter.status = 'OPEN' " + - " HAVING distance <= 1500 " + + " HAVING distance <= 1000 " + " ORDER BY distance " + " LIMIT 1", nativeQuery = true)