Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 거리순으로 음식점을 정렬해서 응답 #197

Conversation

TaeyeonRoyce
Copy link
Member

✨ 요약

음식점 조회 시 거리를 기준으로 오름차순 정렬하여 응답한다



😎 해결한 이슈

@github-actions
Copy link

github-actions bot commented Jul 28, 2023

Test Results

37 tests  +1   37 ✔️ +1   6s ⏱️ ±0s
  9 suites +1     0 💤 ±0 
  9 files   +1     0 ±0 

Results for commit 85a2f32. ± Comparison against base commit 7171684.

♻️ This comment has been updated with latest results.

Co-authored-by: Donghun Shin <[email protected]>
Co-authored-by: odo27 <[email protected]>
Co-authored-by: kdkdhoho <[email protected]>
Copy link
Collaborator

@kdkdhoho kdkdhoho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines 37 to 44
// private static final String SELECT_RESTAURANT_JOIN_VIDEO_AND_CELEB = """
// SELECT DISTINCT r
// FROM Restaurant r
// JOIN Video v
// ON v.restaurant = r
// JOIN Celeb c
// ON c = v.celeb
// """;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주석 !

Co-authored-by: Donghun Shin <[email protected]>
Co-authored-by: odo27 <[email protected]>
Co-authored-by: kdkdhoho <[email protected]>
@TaeyeonRoyce TaeyeonRoyce merged commit 4054c12 into develop-backend Jul 28, 2023
3 checks passed
@TaeyeonRoyce TaeyeonRoyce deleted the 194-feat-거리순으로-음식점을-정렬해서-응답 branch July 28, 2023 07:56
TaeyeonRoyce added a commit that referenced this pull request Aug 3, 2023
* infra: CODEOWNERS 등록 (#129)

* init: 프로젝트 초기 설정

* feat: 기본 도메인들을 생성한다 (#132)

* feat: 기본 예외 작성 (#131)

* feat: BaseEntity 작성 (#131)

* feat: Celeb 도메인 작성 (#130)

* feat: Restaurant 도메인 작성 (#130)

* feat: RestaurantImage 도메인 작성 (#130)

* feat: Video 도메인 작성 (#130)

* style: polishing (#130)

---------

Co-authored-by: shin-mallang <[email protected]>
Co-authored-by: TaeyeonRoyce <[email protected]>
Co-authored-by: odo27 <[email protected]>

* feat: 음식점 전체 조회 api 구현 (#135)

* feat: 음식점 전체 조회 서비스 구현 (#133)

* refactor: fixture 분리 (#133)

* feat: 음식점 전체 조회 API 구현 (#133)

* test: 인수테스트 공통화 (#133)

* style: polishing (#133)

* style: polishing (#133)

---------

Co-authored-by: TaeyeonRoyce <[email protected]>
Co-authored-by: shin-mallang <[email protected]>
Co-authored-by: kdkdhoho <[email protected]>

* fix: truncate 를 통한 테스트 데이터 초기화

* infra: 백엔드 cicd 환경 설정 (#142)

* fix: truncate 를 통한 테스트 데이터 초기화 (#139)

* chore: application.yml 배포환경별 설정 (#139)

* fix: ddl-auto 수정 (#139)

* fix: application yml 변수 설정 (#139)

* feat: 위도, 경도 반환 타입을 Double로 변경 (#139)

* infra: 백엔드 CI 작성 (#139)

* infra: 백엔드 CI 오류 수정 (#139)

* infra: workflow 수정 (#139)

* Update backend-dev-cd.yml

---------

Co-authored-by: Taeyeon <[email protected]>

* feat: /api prefix 추가 (#146)

* feat: /api prefix 추가 (#145) *

* feat: CORS 설정 추가 (#97) (#149)

* feat: 셀럽 ID와 카테고리, 음식점이름으로 음식점 검색 API 작성 (#152)

* feat: 셀럽 전체 조회 API 구현 (#147)

* feat: 셀럽 검색 쿼리 구현 (#147)

* feat: 셀럽 검색 API 구현 (#147)

* refactor: 테스트 검증 방식 수정 (#147)

* refactor: 메서드 잘못된 네이밍 변경 (#147)

* fix: AND에 공백 추가 (#147)

* refactor: util 클래스 네이밍 변경 (#147)

* fix: Service에 잘못 붙은 어노테이션 제거 (#147)

* refactor: polishing (#147)

* test: 부족한 테스트 추가 (#147)

* fix: 검증이 잘 되지 않는 테스트 방법 수정 (#147)

* refactor: 변수명 수정 (#147)

* refactor: polishing (#147)

* refactor: 음식점 조회 결과 필드 이름 수정 (#161)

* fix: 이미지를 base64로 인코딩하여 반환한다 (#166)

* feat: 지역 기반 음식점 검색 기능 구현 (#159)

* refactor: Restaurant 검색 조건에 위도, 경도, 스케일 추가 (#153)

* refactor: Restaurant 위도, 경도 타입 변경 (String -> Double) (#153)

* refactor: 검색 조건에 따른 RestaurantQueryRepositoryTest 분리 (#153)

* test: 위치 정보를 포함한 Point 클래스 추가 (#153)

* test: RestaurantFixture에 의미 있는 위치 정보를 포함하여 저장 (#153)

* test: SeedData 수정 (#153)

* refactor: RestaurantSearchCond 필드 이름 수정
zoomScale -> distance (#153)

* feat: 음식점 조회시, 특정 위치를 기준으로 일정 거리내 음식점 조회 기능 추가 (#153)

* test: SeeData 음식점 거리 분포 수정 (#153)

* test: 거리 기준으로 포함한 음식점 검색 테스트 추가 (#153)

* refactor: test 에서 동일하게 발생하는 로직 메서드로 분리(셀럽 방문 여부 확인 로직, 일정 거리 이내 여부 확인 로직) (#153)

* feat: 일정 범위내 음식점 조회 조건 추가 (#153)

* feat: 일정 범위내 음식점 조회 조건 파라미터 추가 (#153)

* style: polishing

* feat: 소셜 로그인 구현 (#173)

* chore: API 키 설정 (#158)

* feat: OAuthClient 인터페이스 추가 (#158)

* feat: 카카오 OAuth 응답 생성 (#158)

* feat: AuthException 구현 (#158)

* feat: Member 구현 (#158)

* feat: MemberRepository 구현 (#158)

* feat: KakaoOAuthClient 구현 (#158)

* feat: AuthService 구현 (#158)

* feat: OAuth Redirect URI 컨트롤러 구현 (#158)

* fix: createdDate 검증 제거 (#158)

* refactor: OAuth 로그인 추상화 (#148)

Co-authored-by: shin-mallang <[email protected]>

* refactor: RestTemplate 대신 HttpInterface 사용 (#148)

Co-authored-by: shin-mallang <[email protected]>

* refactor: Mapping 대신 Composite 사용 (#148)

* refactor: Properties binding 방식 record로 변경 (#148)

* feat: 네이버 로그인 추가 (#148)

* feat: 구글 로그인 추가 (#148)

* refactor: Polishing (#148)

---------

Co-authored-by: TaeyeonRoyce <[email protected]>
Co-authored-by: shin-mallang <[email protected]>
Co-authored-by: kdkdhoho <[email protected]>

* feat: 음식점 데이터 저장 API 기능 구현 (#175)

* feat: AdminException 구현 (#148)

* feat: AdminService 구현 (#148)

* feat: 음식점 데이터 저장 API 구현 (#148)

* fix: Restaurant 엔티티 필드의 위도, 경도 타입 변경에 따른 코드 수정 (#153)

* refactor: Request 객체에서가 아닌, Service에서 날짜 형식을 맞춰주도록 수정 (#148)

* refactor: 유튜브 채널 이름으로 get했을 때 Repository에서 예외가 터지도록 수정 (#148)

* refactor: Response 객체 내에 toDomain 메서드 추가 (#148)

* refactor: API URI 변경 (#148)

* refactor: API URI 변경 및 상수 추출 (#148)

* test: 국민연금 Fixture 위치 변경 (#148)

* style: 클래스 아래 개행 추가 (#148)

* test: Admin 인수테스트 DisplayName 변경 (#148)

* test: Admin 인수테스트 한글로 읽을 수 있게끔 수정 (#148)

* test: 중복 애노테이션 제거 및 스타일 수정 (#148)

* refactor: 함수명, 변수명 수정 (#148)

* chore: ddl-auto create로 변경

* fix: oauth 버그 해결 (#182)

* fix: 카카오 redirect_url -> redirect_uri

* fix: redirect_url -> redirect_uri

* feat: 음식점 조회 시 페이징을 적용한다 (#174)

* feat: 음식점 조회 페이징 처리 (#172)

* refactor: 동적쿼리 고도화 (#147)

* style: 컨벤션

* feat: 데이터 저장 시 날짜 형식이 달라 발생하는 예외 추가  (#183)

* feat: 데이터 저장 시 날짜 형식이 달라 발생하는 예외 추가 (#181)

* test: 테스트 코드 예외 검증 방식 통일 (#181)

* refactor: 코드 일관성을 맞춘다 (#188)

* refactor: polishing (#185)

* refactor: 통합 테스트용 어노테이션 생성 (#185)

* refactor: local용 application.yml 파일 생성, redirect_uri로 네이밍 변경 (#185)

* fix: 음식점 사진이 없는 경우에도 음식점 정보 출력하도록 변경

* refactor: Restaurant의 필드 순서 변경

* style: yml 주석 제거 (#185)

* style: 어드민 서비스의 잘못됩 입력 생성 포맷 보기 좋게 변경

* test: 테스트코드 given, when, then 형식 맞춤

* style: 어노테이션 순서 맞춤 (#185)

* fix: png -> jpeg으로 변환

* feat: oauth 로그인 이후 세션 정보 반환 (#191)

* feat: 로그인 이후 세션 정보 반환 (#189)

* feat: 검색영역 값이 누락된 경우 예외 처리 구현 (#187)

---------

Co-authored-by: TaeyeonRoyce <[email protected]>

* feat: 거리순으로 음식점을 정렬해서 응답 (#197)

* feat: 위경도 거리 계산 구현 (#194)

* feat: 음식점 조회시 거리 순 정렬 구현 (#194)

* style: 주석 제거 (#194)

* fix: 페이징 오류 수정  (#194)

---------

Co-authored-by: odo27 <[email protected]>
Co-authored-by: Donghun Shin <[email protected]>
Co-authored-by: kdkdhoho <[email protected]>

* refactor: polishing (#207)

* infra: 서브모듈 추가 (#209)

* infra: git submodule 추가 (#208)

* infra: submodule update (#208)

* infra: submodule 빌드 시 resources에 추가 (#208)

* infra: submodule 빌드 시 resources에 추가 (#208)

---------

Co-authored-by: TaeyeonRoyce <[email protected]>

* infra: 프로덕션용 CI/CD 워크플로우 작성 (#214)

* infra: backend prod CI/CD 설정 (#213)

* backend-dev-cd.yml 수정 (#213)

* fix: countquery distinct 구문 수정 (#224)

* fix: countquery distinct 구문 수정 (#222)

* feat: 좋아요 기능 구현 (#226)

* feat: RestaurantLike 구현 (#206)

* feat: member 대신 oauthMember 사용 (#206)

* feat: RestaurantLikeRepository 구현(#206)

* feat: RestaurantException 추가 (#206)

* feat: AuthExceptionType 추가 (#206)

* feat: findByRestaurantAndMember 추가 (#206)

* feat: 음식점 getById 추가 (#206)

* feat: 멤버 getById 추가 (#206)

* feat: 좋아요 기능 추가 (#206)

* feat: 좋아요 API 구현 (#206)

* feat: Auth 어노테이션 구현 (#206)

* feat: AuthArgumentResolver 구현 (#206)

* feat: like API 구현 (#206)

* refactor: 패키지 이동 (#206)

* feat: AuthInterceptor 추가 (#206)

* refactor: interceptor, resolver 순서 변경 (#206)

* feat: memberId 없을 때 예외처리 (#206)

* test: given 조건 수정 (#206)

* test: repository 추가 (#206)

* test: 음식점 좋아요 인수테스트 추가 (#206)

* refactor: 변수명 개선 (#206)

* fix: truncate.sql 업데이트 (#206)

* refactor: given 추출 (#206)

* infra: git-submodule 경로 수정 (#232)

* Update .gitmodules

* Update backend-ci.yml

* infra: 서브모듈 버전 업데이트 (#233)

---------

Co-authored-by: shin-mallang <[email protected]>
Co-authored-by: 김동호 <[email protected]>
Co-authored-by: odo27 <[email protected]>
Co-authored-by: odo27 <[email protected]>
Co-authored-by: kdkdhoho <[email protected]>
Co-authored-by: kdkdhoho <[email protected]>
kdkdhoho added a commit that referenced this pull request Aug 3, 2023
* infra: CODEOWNERS 등록 (#129)

* init: 프로젝트 초기 설정

* feat: 기본 도메인들을 생성한다 (#132)

* feat: 기본 예외 작성 (#131)

* feat: BaseEntity 작성 (#131)

* feat: Celeb 도메인 작성 (#130)

* feat: Restaurant 도메인 작성 (#130)

* feat: RestaurantImage 도메인 작성 (#130)

* feat: Video 도메인 작성 (#130)

* style: polishing (#130)

---------

Co-authored-by: shin-mallang <[email protected]>
Co-authored-by: TaeyeonRoyce <[email protected]>
Co-authored-by: odo27 <[email protected]>

* feat: 음식점 전체 조회 api 구현 (#135)

* feat: 음식점 전체 조회 서비스 구현 (#133)

* refactor: fixture 분리 (#133)

* feat: 음식점 전체 조회 API 구현 (#133)

* test: 인수테스트 공통화 (#133)

* style: polishing (#133)

* style: polishing (#133)

---------

Co-authored-by: TaeyeonRoyce <[email protected]>
Co-authored-by: shin-mallang <[email protected]>
Co-authored-by: kdkdhoho <[email protected]>

* fix: truncate 를 통한 테스트 데이터 초기화

* infra: 백엔드 cicd 환경 설정 (#142)

* fix: truncate 를 통한 테스트 데이터 초기화 (#139)

* chore: application.yml 배포환경별 설정 (#139)

* fix: ddl-auto 수정 (#139)

* fix: application yml 변수 설정 (#139)

* feat: 위도, 경도 반환 타입을 Double로 변경 (#139)

* infra: 백엔드 CI 작성 (#139)

* infra: 백엔드 CI 오류 수정 (#139)

* infra: workflow 수정 (#139)

* Update backend-dev-cd.yml

---------

Co-authored-by: Taeyeon <[email protected]>

* feat: /api prefix 추가 (#146)

* feat: /api prefix 추가 (#145) *

* feat: CORS 설정 추가 (#97) (#149)

* feat: 셀럽 ID와 카테고리, 음식점이름으로 음식점 검색 API 작성 (#152)

* feat: 셀럽 전체 조회 API 구현 (#147)

* feat: 셀럽 검색 쿼리 구현 (#147)

* feat: 셀럽 검색 API 구현 (#147)

* refactor: 테스트 검증 방식 수정 (#147)

* refactor: 메서드 잘못된 네이밍 변경 (#147)

* fix: AND에 공백 추가 (#147)

* refactor: util 클래스 네이밍 변경 (#147)

* fix: Service에 잘못 붙은 어노테이션 제거 (#147)

* refactor: polishing (#147)

* test: 부족한 테스트 추가 (#147)

* fix: 검증이 잘 되지 않는 테스트 방법 수정 (#147)

* refactor: 변수명 수정 (#147)

* refactor: polishing (#147)

* refactor: 음식점 조회 결과 필드 이름 수정 (#161)

* fix: 이미지를 base64로 인코딩하여 반환한다 (#166)

* feat: 지역 기반 음식점 검색 기능 구현 (#159)

* refactor: Restaurant 검색 조건에 위도, 경도, 스케일 추가 (#153)

* refactor: Restaurant 위도, 경도 타입 변경 (String -> Double) (#153)

* refactor: 검색 조건에 따른 RestaurantQueryRepositoryTest 분리 (#153)

* test: 위치 정보를 포함한 Point 클래스 추가 (#153)

* test: RestaurantFixture에 의미 있는 위치 정보를 포함하여 저장 (#153)

* test: SeedData 수정 (#153)

* refactor: RestaurantSearchCond 필드 이름 수정
zoomScale -> distance (#153)

* feat: 음식점 조회시, 특정 위치를 기준으로 일정 거리내 음식점 조회 기능 추가 (#153)

* test: SeeData 음식점 거리 분포 수정 (#153)

* test: 거리 기준으로 포함한 음식점 검색 테스트 추가 (#153)

* refactor: test 에서 동일하게 발생하는 로직 메서드로 분리(셀럽 방문 여부 확인 로직, 일정 거리 이내 여부 확인 로직) (#153)

* feat: 일정 범위내 음식점 조회 조건 추가 (#153)

* feat: 일정 범위내 음식점 조회 조건 파라미터 추가 (#153)

* style: polishing

* feat: 소셜 로그인 구현 (#173)

* chore: API 키 설정 (#158)

* feat: OAuthClient 인터페이스 추가 (#158)

* feat: 카카오 OAuth 응답 생성 (#158)

* feat: AuthException 구현 (#158)

* feat: Member 구현 (#158)

* feat: MemberRepository 구현 (#158)

* feat: KakaoOAuthClient 구현 (#158)

* feat: AuthService 구현 (#158)

* feat: OAuth Redirect URI 컨트롤러 구현 (#158)

* fix: createdDate 검증 제거 (#158)

* refactor: OAuth 로그인 추상화 (#148)

Co-authored-by: shin-mallang <[email protected]>

* refactor: RestTemplate 대신 HttpInterface 사용 (#148)

Co-authored-by: shin-mallang <[email protected]>

* refactor: Mapping 대신 Composite 사용 (#148)

* refactor: Properties binding 방식 record로 변경 (#148)

* feat: 네이버 로그인 추가 (#148)

* feat: 구글 로그인 추가 (#148)

* refactor: Polishing (#148)

---------

Co-authored-by: TaeyeonRoyce <[email protected]>
Co-authored-by: shin-mallang <[email protected]>
Co-authored-by: kdkdhoho <[email protected]>

* feat: 음식점 데이터 저장 API 기능 구현 (#175)

* feat: AdminException 구현 (#148)

* feat: AdminService 구현 (#148)

* feat: 음식점 데이터 저장 API 구현 (#148)

* fix: Restaurant 엔티티 필드의 위도, 경도 타입 변경에 따른 코드 수정 (#153)

* refactor: Request 객체에서가 아닌, Service에서 날짜 형식을 맞춰주도록 수정 (#148)

* refactor: 유튜브 채널 이름으로 get했을 때 Repository에서 예외가 터지도록 수정 (#148)

* refactor: Response 객체 내에 toDomain 메서드 추가 (#148)

* refactor: API URI 변경 (#148)

* refactor: API URI 변경 및 상수 추출 (#148)

* test: 국민연금 Fixture 위치 변경 (#148)

* style: 클래스 아래 개행 추가 (#148)

* test: Admin 인수테스트 DisplayName 변경 (#148)

* test: Admin 인수테스트 한글로 읽을 수 있게끔 수정 (#148)

* test: 중복 애노테이션 제거 및 스타일 수정 (#148)

* refactor: 함수명, 변수명 수정 (#148)

* chore: ddl-auto create로 변경

* fix: oauth 버그 해결 (#182)

* fix: 카카오 redirect_url -> redirect_uri

* fix: redirect_url -> redirect_uri

* feat: 음식점 조회 시 페이징을 적용한다 (#174)

* feat: 음식점 조회 페이징 처리 (#172)

* refactor: 동적쿼리 고도화 (#147)

* style: 컨벤션

* feat: 데이터 저장 시 날짜 형식이 달라 발생하는 예외 추가  (#183)

* feat: 데이터 저장 시 날짜 형식이 달라 발생하는 예외 추가 (#181)

* test: 테스트 코드 예외 검증 방식 통일 (#181)

* refactor: 코드 일관성을 맞춘다 (#188)

* refactor: polishing (#185)

* refactor: 통합 테스트용 어노테이션 생성 (#185)

* refactor: local용 application.yml 파일 생성, redirect_uri로 네이밍 변경 (#185)

* fix: 음식점 사진이 없는 경우에도 음식점 정보 출력하도록 변경

* refactor: Restaurant의 필드 순서 변경

* style: yml 주석 제거 (#185)

* style: 어드민 서비스의 잘못됩 입력 생성 포맷 보기 좋게 변경

* test: 테스트코드 given, when, then 형식 맞춤

* style: 어노테이션 순서 맞춤 (#185)

* fix: png -> jpeg으로 변환

* feat: oauth 로그인 이후 세션 정보 반환 (#191)

* feat: 로그인 이후 세션 정보 반환 (#189)

* feat: 검색영역 값이 누락된 경우 예외 처리 구현 (#187)

---------

Co-authored-by: TaeyeonRoyce <[email protected]>

* feat: 거리순으로 음식점을 정렬해서 응답 (#197)

* feat: 위경도 거리 계산 구현 (#194)

* feat: 음식점 조회시 거리 순 정렬 구현 (#194)

* style: 주석 제거 (#194)

* fix: 페이징 오류 수정  (#194)

---------

Co-authored-by: odo27 <[email protected]>
Co-authored-by: Donghun Shin <[email protected]>
Co-authored-by: kdkdhoho <[email protected]>

* refactor: polishing (#207)

* infra: 서브모듈 추가 (#209)

* infra: git submodule 추가 (#208)

* infra: submodule update (#208)

* infra: submodule 빌드 시 resources에 추가 (#208)

* infra: submodule 빌드 시 resources에 추가 (#208)

---------

Co-authored-by: TaeyeonRoyce <[email protected]>

* infra: 프로덕션용 CI/CD 워크플로우 작성 (#214)

* infra: backend prod CI/CD 설정 (#213)

* backend-dev-cd.yml 수정 (#213)

* fix: countquery distinct 구문 수정 (#224)

* fix: countquery distinct 구문 수정 (#222)

* feat: 좋아요 기능 구현 (#226)

* feat: RestaurantLike 구현 (#206)

* feat: member 대신 oauthMember 사용 (#206)

* feat: RestaurantLikeRepository 구현(#206)

* feat: RestaurantException 추가 (#206)

* feat: AuthExceptionType 추가 (#206)

* feat: findByRestaurantAndMember 추가 (#206)

* feat: 음식점 getById 추가 (#206)

* feat: 멤버 getById 추가 (#206)

* feat: 좋아요 기능 추가 (#206)

* feat: 좋아요 API 구현 (#206)

* feat: Auth 어노테이션 구현 (#206)

* feat: AuthArgumentResolver 구현 (#206)

* feat: like API 구현 (#206)

* refactor: 패키지 이동 (#206)

* feat: AuthInterceptor 추가 (#206)

* refactor: interceptor, resolver 순서 변경 (#206)

* feat: memberId 없을 때 예외처리 (#206)

* test: given 조건 수정 (#206)

* test: repository 추가 (#206)

* test: 음식점 좋아요 인수테스트 추가 (#206)

* refactor: 변수명 개선 (#206)

* fix: truncate.sql 업데이트 (#206)

* refactor: given 추출 (#206)

* infra: git-submodule 경로 수정 (#232)

* Update .gitmodules

* Update backend-ci.yml

* infra: 서브모듈 버전 업데이트 (#233)

* infra: 서브모듈 버전 업데이트

---------

Co-authored-by: Taeyeon <[email protected]>
Co-authored-by: shin-mallang <[email protected]>
Co-authored-by: TaeyeonRoyce <[email protected]>
Co-authored-by: odo27 <[email protected]>
Co-authored-by: odo27 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants