[REFACTOR] 미션 승인/거절 로직 고도화 및 팩토리명 정리 - #137
Merged
Merged
Conversation
- 미션 승인 시점/시작일 비교 후 즉시 진행중인 상태로 변경하는 로직 추가 - 미션 승인 시점/종료일 비교 후 진행 중인 상태로 변경되는 예외 처리 추가
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the mission approval/rejection logic by adding period validation to prevent approval after mission end dates, implementing immediate state transition to IN_PROGRESS when approval happens on or after the start date, and standardizing domain factory method naming from create to of.
Changes:
- Added validation to prevent mission approval after end date with new
LATE_MISSION_APPROVALerror code - Implemented immediate state transition to IN_PROGRESS during approval if start date has already passed
- Renamed factory method from
Mission.create()toMission.of()for naming consistency
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| MissionController.java | Updated API documentation to describe immediate IN_PROGRESS state transition behavior |
| Mission.java | Renamed static factory method from create to of |
| MissionErrorCode.java | Added LATE_MISSION_APPROVAL error code for expired mission approval attempts |
| MissionBatchService.java | Clarified comment to specify that query targets APPROVAL_ACCEPTED status |
| MissionApprovalService.java | Added validateNotExpired() check and logic for immediate state transition when start date ≤ today |
| CreateMissionService.java | Updated factory method call from Mission.create() to Mission.of() |
| ApproveMissionUseCase.java | Added interface comment for the decide method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
수고하셨습니다! |
Gimini-3
approved these changes
Jan 20, 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.
1. 한줄 요약 (What / Why)
2. 리뷰 포인트 (최대 3개)
LocalDate.now()기준이라 서버 타임존 및 기간 경계 처리에 문제가 없는지findAllMissionsStartingToday)와 중복/충돌 없이 동작하는지LATE_MISSION_APPROVAL예외 추가로 클라이언트/문서화에 누락된 영향은 없는지3. 테스트 방법 (간단히)
./gradlew testPOST /api/missions/{missionId}/approval(본인 수신자,{ "accept": true }시 종료일 이전이고 시작일 ≤ 오늘이면 즉시 진행중 전환,{ "accept": false }시 거절 처리 확인)4) 리스크/주의사항 (있으면)
🔗 Relation Issue