Refactor: 예약 정보 반환하는 형식 수정 #296
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
기존 날짜 별 reserve 객체를 각각 응답한 것을 이름이 같은 예약 서비스별로 묶고 그 안에서 날짜별로 다시 묶어 응답하게 변경했습니다.
변경 응답 구조
Key Changes
Testing
To Reviewers
BoothReservationService 안 getGroupReservation 메소드를 만들어서 boothId 와 일치하는 예약 객체들을 리스트로 받고 그 안에서
예약명별로 그룹화를 1차 작업했습니다.
예약 서비스의 기본 정보(id, name, description,...) 과 같은 정보는 하나의 서비스는 모두 같은 기본 정보들을 내포하고 있기 때문에 예약 객체 리스트중 첫번째 데이터를 기준으로 정보를 불러왔습니다.
그룹화 시킨 리스트들은 date를 기준으로 다시 그룹화가 진행되고 boothReservationDateDto에 그룹화된 date와 detail 정보들이 담겨집니다.
처음에는 쿼리문을 통해 name의 group by 작업을 진행했었는데 리턴은 boothReservation 리스트 형태로 반환하다 보니 그룹 형태가 유지 되지 않는다는 점을 알게 되었습니다. 그래서 service 계층에서 groupingBy 라는 메소드를 사용해서 그룹화를 진행했습니다.
추가적으로 질문이나 의견 있으시면 코멘트 남겨주세요!