[feat] 데이트 코스 수정 및 삭제 기능 구현#6
Merged
Merged
Conversation
[주의] 단위 테스트(gradle test)는 통과하였으나, 로컬 서버를 직접 구동하여
API 호출로 검증하는 통합 테스트는 아직 수행하지 않은 상태입니다.
변경 사항:
- PUT /api/v1/rooms/{roomId}/date-courses/{dateCourseId}
코스 이름·장소 순서·삭제·추가를 단일 전체 교체 방식으로 처리.
추가 장소는 해당 방에 저장된 roomPlaceId만 허용(방 소속 검증).
중복 코스 발생 시 E409_DUPLICATE_DATE_COURSE 코드로 응답하여
프론트에서 모달 분기 가능하도록 함.
권한: 코스 생성자 또는 저장자만 수정 가능.
- DELETE /api/v1/rooms/{roomId}/date-courses/{dateCourseId}
저장된 코스를 soft delete(deletedAt 설정).
삭제 후 목록·상세·중복 판정 모든 조회에서 자동 제외.
권한: 코스 생성자 또는 저장자만 삭제 가능.
기타:
- DateCourse → SoftDeletableEntity 상속으로 변경
- 기존 저장/조회 쿼리에 deletedAt IS NULL 조건 추가
- E409_DUPLICATE_DATE_COURSE ErrorCode 추가
(기존 DateCourseSaveService의 중복 409도 통일)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- RoomPlaceRepository.findAllByIdInAndRoomId에 JOIN FETCH 추가 deleteByDateCourseId의 clearAutomatically=true 실행 후 영속성 컨텍스트가 초기화되어 RoomPlace 엔티티가 detached 상태가 됨 이후 toCourseResult에서 place/serviceCategory/serviceTag를 lazy 로드하면 LazyInitializationException이 발생해 500 응답을 반환하던 버그 수정 - scripts/seed-datecourse-test.sql 추가 데이트 코스 전체 워크플로(생성·저장·수정·삭제) 로컬 테스트용 장소 27개(FOOD 10, CAFE 9, ACTIVITY 8), POPULAR 테스트용 likes 포함 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- DateCourseEditService: 미사용 import(LinkedHashMap) 제거 - 테스트 메서드명을 checkstyle MethodName 규칙(^[a-z][a-zA-Z0-9]*$)에 맞게 영어 camelCase로 변경 DateCourseUpdateRequestValidationTest, DateCourseEditServiceTest, DateCourseDeleteServiceTest, DateCourseDuplicatePolicyTest Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1000hyehyang
approved these changes
Jun 6, 2026
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.
✨ 무엇을 바꿨나요?
저장된 데이트 코스를 수정하고 삭제할 수 있는 API를 추가함,
(수정 API에서 발생하던 500 오류도 함께 수정)
🔗 관련 이슈
Closes #5
💡 왜 바꿨나요?
데이트 코스 생성·저장까지만 가능했던 상태에서, 저장 이후 코스 내용을 바꾸거나 삭제할 수 없어 실사용에 제약 있음.
코스 이름 변경, 장소 추가·제거·순서 변경을 한 번의 요청으로 처리하는 수정기능과, soft delete 기반의 삭제 기능을 구현함.
📝 주요 변경 사항
👀 리뷰어가 보면 좋은 부분
🧪 테스트
방식 (해당하는 것만 체크)
메모 (시나리오, 커맨드, 스크린샷 링크 등 — 선택)