Skip to content

Commit

Permalink
feat: 대리점 조회시 반경 10km -> 2km 이내로 수정 (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeoSiun committed Aug 23, 2023
1 parent 3b3e5f9 commit 30a9030
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package softeer.be_my_car_master.infrastructure.jpa.agency.repository;

import java.util.Collection;
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
Expand All @@ -16,7 +15,7 @@ public interface AgencyJpaRepository extends JpaRepository<AgencyEntity, Long> {
+ "WHERE a.id IN ("
+ "SELECT id "
+ "FROM agency "
+ "WHERE ST_Distance_Sphere(POINT(:longitude, :latitude), POINT(longitude, latitude)) < 10000"
+ "WHERE ST_Distance_Sphere(POINT(:longitude, :latitude), POINT(longitude, latitude)) < 2000"
+ ")",
nativeQuery = true)
List<AgencyEntity> findAllByLocation(
Expand Down

0 comments on commit 30a9030

Please sign in to comment.