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

API 숙소 예약 요금 상세 조회 #19

Closed
donggi-lee-bit opened this issue Jun 1, 2022 · 0 comments · Fixed by #29
Closed

API 숙소 예약 요금 상세 조회 #19

donggi-lee-bit opened this issue Jun 1, 2022 · 0 comments · Fixed by #29
Assignees
Labels
Milestone

Comments

@donggi-lee-bit
Copy link
Collaborator

요구사항

  • GET /accommodations/{id}/detail-price?checkIn=2022-10-23&checkOut=2022-10-30&guestCount=3
    • 예약하기 버튼을 누르면 예약할 숙소의 가격들을 전달한다.
@donggi-lee-bit donggi-lee-bit added this to the [BE] 2주차 milestone Jun 1, 2022
@donggi-lee-bit donggi-lee-bit self-assigned this Jun 1, 2022
@donggi-lee-bit donggi-lee-bit added this to To do in [BE] - airbnb server via automation Jun 1, 2022
@donggi-lee-bit donggi-lee-bit moved this from To do to In progress in [BE] - airbnb server Jun 2, 2022
donggi-lee-bit added a commit that referenced this issue Jun 2, 2022
- 주 단위, 월 단위, 연 단위 할인 정책 enum 클래스를 만들어 예약한 날짜를 계산하여 할인을 적용할 수 있는 로직 추가
@donggi-lee-bit donggi-lee-bit linked a pull request Jun 2, 2022 that will close this issue
[BE] - airbnb server automation moved this from In progress to Done Jun 2, 2022
Louie-03 added a commit that referenced this issue Jun 9, 2022
* [sally4405/#13] Fix: 커밋하다 실수로 들어가게된 코드 수정

* [sally4405/#13] Fix: 메인 히어로 이미지 주소 변경 및 API 명세에 맞게 주소 변경

- 글자가 없는 히어로 이미지로 수정
- /main 앞에 /banners 추가

* [sally4405/#13] Fix: 인기 여행지 조회 주소 수정

- API 명세에 맞게 travel에서 travels로 수정

* [sally4405/#13] Fix: 이미지 주소 추가

Co-authored-by: Louie-03 <dhdustnr0134@naver.com>

* [sally4405/#13] Fix: 테스트 코드에 imageUrl 추가

Co-authored-by: Louie-03 <dhdustnr0134@naver.com>

* [sally4405/#16] Style: RoomInformation 필드명 오타 수정

- bathroomCont 오타 수정

* [sally4405/#16] Feat: 특정 지역의 숙소 요금 정보 조회 API 개발

- JPA에 JPQL을 이용하여 입력 받은 지역이 포함된 숙소를 조회하여 해당 숙소의 가격을 리스트로 조회
- 리스트로 가져온 가격들의 평균 값을 계산
- 값을 확인하기 위해 예제 데이터 data.sql에 추가

* [sally4405/#18] Feat: 숙소 상세 정보 조회 API 개발

- Spring Data JPA가 기본 제공하는 findById() 메서드를 이용하여 숙소 조회
- 유효하지 않은 id로 요청시 IllegalArgumentException 던지도록
- dto에 wishlist 필드 업데이트는 어떻게 해야할지 의문

* [sally4405/#18] Feat: 숙소 상세 정보 조회 dto에 wish 추가

- WishRepository에서 해당 숙소의 id로 wish를 조회하여 숙소 상세 정보를 조회하는 dto에 wish 값 추가

* [sally4405-#4] Style: WishList 관련 클래스 이름 변경

* [sally4405-#17] Feat: 샘플 데이터 추가

* [sally4405-#17] Feat: 예약 상세 조회 기능 구현

* [sally4405-#17] Fix: 테스트 실패 오류 수정

* [sally4405-#25] Feat: 예약 취소 기능 구현

* [sally4405-#27] Feat: 위시리스트 조회 기능 구현

* [sally4405/#19] Feat: 숙소 예약 요금 상세 조회 API 개발

- 주 단위, 월 단위, 연 단위 할인 정책 enum 클래스를 만들어 예약한 날짜를 계산하여 할인을 적용할 수 있는 로직 추가

* [sally4405/#30] Fix: 추가한 예제 데이터를 테스트 결과에 반영하도록 수정 및 Slf4j 어노테이션 삭제

* [sally4405-#27] Feat: 위시리스트 추가 기능 구현

* [sally4405/#20] Feature: 예약 저장 API 구현

- POST 요청이 왔을 때 Request Body에 숙소 id, 체크인, 체크아웃 날짜, 예약 인원, 최종 가격이 dto에 담겨져 들어온다
- dto에 담겨진 데이터를 통해 Book 객체를 생성하여 BookRepository의 save 메서드를 이용해 예약을 저장한다.

* [sally4405/#21] Feature: 예약 목록 조회 API 구현

- BookRepository에서 예약된 Book들을 조회하여 예약 목록을 조회할 수 있도록 dto에 담아서 반환

* [sally4405/#21] Fix: 체크인, 체크아웃 타입 변경

- LocalDateTime에서 LocalDate로 변경

* [sally4405-#36] Feat: 입력한 값에 맞는 모든 숙소 조회 기능 구현

Co-authored-by: donggi-lee-bit <devdonggilee@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant