Conversation
f6c205c to
960a127
Compare
* refactor: CreateStampRequest DTO order 필드 제거 * feat: 특정 여행에 속한 스탬프의 마지막 순서를 조회하는 findMaxStampOrderByTripId 쿼리 추가 * refactor: 스탬프 생성(StampCommandService.createStamp) 로직 리팩토링 * refactor: 다중 스탬프 생성(StampCommondService.createStamps) 로직 리팩토링 * refactor: 스탬프 순서 검증(StampPolicy.validateStampOrder) 제거 * test: 스탬프 생성, 다중 스탬프 생성 단위 테스트 수정 * test: 여행 생성 통합 테스트 수정 * test: 스탬프 Fixture 클래스 수정
chaiminwoo0223
approved these changes
Oct 16, 2025
Contributor
chaiminwoo0223
left a comment
There was a problem hiding this comment.
고생하셨습니다. 머지 부탁드립니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📌 작업 내용 및 특이사항
✅ 스탬프 순서 지정 방식 변경
클라이언트에서 order 계산 후 요청, 서버에서 order 검증 -> 서버에서 특정 여행의 마지막 스탬프 order 값을 추출해 지정하는 방법으로 변경했습니다.
[ 리팩토링 전 ]
[ 리팩토링 후 ]
CreateStampRequest DTO에서 order 필드를 제거했습니다.findMaxStampOrderByTripId()쿼리 메서드를 추가했습니다.stamp_order필드에 코스형 여행일 경우에는findMaxStampOrderByTripId() + 1값을, 탐험형 여행일 경우에는0을 지정해 스탬프를 생성하도록 구현했습니다.order값을 검증하는StampPolicy.validateStampOrder메서드를 제거했습니다.서버에서 검증된 순서를 지정하고 직접 순서를 계산/추출하기때문에 검증까지 수행하지 않도록 구성했습니다.
StampCommandService.createStamp) 로직과 다중 스탬프 생성(StampCommandService.createStamps) 모두 변경사항을 반영했습니다.✅ 관련 테스트 코드 수정
StampControllerIntegrationTest에서 단일 스탬프 생성 테스트 코드의 스탬프 순서 관련 예외 반환 테스트를 제거했습니다.StampCommandServiceTest에서 단일 스탬프 생성, 다중 스탬프 생성 테스트 코드를 로직 변경에 맞게 수정했습니다.TripControllerIntegrationTest에서 여행 생성 테스트 코드의 스탬프 순서 관련 예외 반환 테스트를 제거했습니다.🌱 관련 이슈
🔍 참고사항(선택)
📚 기타(선택)