Skip to content

Conversation

@chaiminwoo0223
Copy link
Contributor

@chaiminwoo0223 chaiminwoo0223 commented Nov 3, 2025

📌 작업 내용 및 특이사항

✅ CommandRepository 구현 및 명령(등록, 검증, 삭제) 로직 분리

  • MemberCommandRepository, MemberCommandRepositoryAdapter 구현
  • TripCommandRepository, TripCommandRepositoryAdapter 구현
  • StampCommandRepository, StampCommandRepositoryAdapter 구현
  • MissionCommandRepository, MissionCommandRepositoryAdapter 구현
  • DailyMissionCommandRepository, DailyMissionCommandRepositoryAdapter 구현
  • StudyLogCommandRepository, StudyLogCommandRepositoryAdapter 구현
  • StudyLogDailyMissionCommandRepository, StudyLogDailyMissionCommandRepositoryAdapter 구현
  • PomodoroCommandRepository, PomodoroCommandRepositoryAdapter 구현
  • TripReportQueryRepository, TripReportQueryRepositoryAdapter 구현

✅ 스탬프 생성 관련 로직 개선

  • StampQueryService.getNextStampOrderByTrip()에서 받은 nextOrder를 이용해 스탬프 생성 로직 개선
  • StampQueryRepository, StampQueryRepositoryAdapter에서 findMaxStampOrderByTripId 메서드 삭제
  • StampCommandService.computeNextStampOrder() 삭제

✅ 스탬프 삭제 관련 로직 개선

  • StampCommandService.deleteStamp()에서 스탬프 순서 변경 로직 분리
  • StampCommandService.deleteStamp()소프트 삭제만 담당

✅ QueryRepository 메서드 추가

  • StampQueryRepository, StampQueryRepositoryAdapterfindNextStampOrderByTripId 메서드 추가

✅ QueryService 메서드 추가

  • StampQueryServicegetNextStampOrderByTrip 메서드 추가
  • StampQueryServicegetStampsToShiftAfterDeleted 메서드 추가
  • StampCommandServiceshiftStampOrders 메서드 추가

✅ 테스트 추가

  • StampQueryServiceTestGetNextStampOrderByTrip 단위 테스트 추가
  • StampQueryServiceTestGetStampsToShiftAfterDeleted 단위 테스트 추가
  • StampCommandServiceTestShiftStampOrders 단위 테스트 추가
  • StampFixturecreateStampWithName 메서드 추가

✅ 테스트 수정

  • MemberCommandServiceTest 단위 테스트 수정
  • TripCommandServiceTest 단위 테스트 수정
  • StampCommandServiceTest 단위 테스트 수정
  • MissionCommandServiceTest 단위 테스트 수정
  • DailyMissionCommandServiceTest 단위 테스트 수정
  • StudyLogCommandServiceTest 단위 테스트 수정
  • StudyLogDailyMissionCommandServiceTest 단위 테스트 수정
  • PomodoroCommandServiceTest 단위 테스트 수정
  • DailyGoalCommandServiceTest 단위 테스트 수정
  • TripReportCommandServiceTest 단위 테스트 수정
  • TripReportStudyLogCommandServiceTest 단위 테스트 수정

🌱 관련 이슈


🔍 참고사항(선택)

  • QueryRepositoryAdapter에서 Q 클래스 static import 적용으로 QueryDSL 가독성 향상
  • DailyGoalQueryRepository -> DailyGoalCommandRepository 이름 변경
  • TripReportQueryRepository -> TripReportCommandRepository 이름 변경
  • TripReportStudyLogQueryRepository -> TripReportStudyLogCommandRepository 이름 변경

📚 기타(선택)

@chaiminwoo0223 chaiminwoo0223 self-assigned this Nov 3, 2025
@chaiminwoo0223 chaiminwoo0223 added the 🪄refactor 기능 개선 및 리팩토링 label Nov 3, 2025
…110)

* feat: MemberCommandRepository, MemberCommandRepositoryAdapter 구현
* feat: TripCommandRepository, TripCommandRepositoryAdapter 구현
* feat: StampCommandRepository, StampCommandRepositoryAdapter 구현
* feat: MissionCommandRepository, MissionCommandRepositoryAdapter 구현
* feat: DailyMissionCommandRepository, DailyMissionCommandRepositoryAdapter 구현
* feat: StudyLogCommandRepository, StudyLogCommandRepositoryAdapter 구현
* feat: StudyLogDailyMissionCommandRepository, StudyLogDailyMissionCommandRepositoryAdapter 구현
* feat: PomodoroCommandRepository, PomodoroCommandRepositoryAdapter 구현
* feat: TripReportQueryRepository, TripReportQueryRepositoryAdapter 구현

* feat: StampQueryRepository, StampQueryRepositoryAdapter에 findNextStampOrderByTripId 메서드 추가
* feat: StampQueryService에 getNextStampOrderByTrip 메서드 추가
* feat: StampQueryService에 getStampsToShiftAfterDeleted 메서드 추가
* feat: StampCommandService에 shiftStampOrders 메서드 추가

* refactor: TripQueryRepositoryAdapter에서 Q 클래스 static import 적용으로 QueryDSL 가독성 향상
* refactor: StampQueryRepositoryAdapter에서 Q 클래스 static import 적용으로 QueryDSL 가독성 향상
* refactor: MissionQueryRepositoryAdapter에서 Q 클래스 static import 적용으로 QueryDSL 가독성 향상
* refactor: DailyMissionQueryRepositoryAdapter에서 Q 클래스 static import 적용으로 QueryDSL 가독성 향상
* refactor: StudyLogQueryRepositoryAdapter에서 Q 클래스 static import 적용으로 QueryDSL 가독성 향상
* refactor: StudyLogDailyMissionQueryRepositoryAdapter에서 Q 클래스 static import 적용으로 QueryDSL 가독성 향상
* refactor: PomodoroQueryRepositoryAdapter에서 Q 클래스 static import 적용으로 QueryDSL 가독성 향상
* refactor: DailyGoalQueryRepositoryAdapter에서 Q 클래스 static import 적용으로 QueryDSL 가독성 향상
* refactor: TripReportQueryRepositoryAdapter에서 Q 클래스 static import 적용으로 QueryDSL 가독성 향상
* refactor: TripReportStudyLogQueryRepositoryAdapter에서 Q 클래스 static import 적용으로 QueryDSL 가독성 향상

* refactor: DailyGoalQueryRepository -> DailyGoalCommandRepository 이름 변경
* refactor: DailyGoalQueryRepositoryAdapter -> DailyGoalCommandRepositoryAdapter 이름 변경
* refactor: TripReportQueryRepository -> TripReportCommandRepository 이름 변경
* refactor: TripReportQueryRepositoryAdapter -> TripReportCommandRepositoryAdapter 이름 변경
* refactor: TripReportStudyLogQueryRepository -> TripReportStudyLogCommandRepository 이름 변경
* refactor: TripReportStudyLogQueryRepositoryAdapter -> TripReportStudyLogCommandRepositoryAdapter 이름 변경

* refactor: StampQueryRepository, StampQueryRepositoryAdapter에서 findMaxStampOrderByTripId 메서드 삭제
* refactor: StampCommandService에서 computeNextStampOrder 메서드 삭제

* refactor: StampCommandService에서 createStamp, createStamps 메서드 int nextOrder 매개변수 추가
* refactor: StampCommandService에서 createStamp, createStamps 메서드 비즈니스 로직 개선
* refactor: StampCommandService에서 deleteStamp 메서드 비즈니스 로직 개선

* refactor: TripFacade에서 createTrip 메서드 비즈니스 로직 개선
* refactor: StampFacade에서 createStamp 메서드 비즈니스 로직 개선
* refactor: StampFacade에서 deleteStamp 메서드 비즈니스 로직 개선

* test: MemberCommandServiceTest 단위 테스트 수정
* test: TripCommandServiceTest 단위 테스트 수정
* test: StampCommandServiceTest 단위 테스트 수정
* test: MissionCommandServiceTest 단위 테스트 수정
* test: DailyMissionCommandServiceTest 단위 테스트 수정
* test: StudyLogCommandServiceTest 단위 테스트 수정
* test: StudyLogDailyMissionCommandServiceTest 단위 테스트 수정
* test: PomodoroCommandServiceTest 단위 테스트 수정
* test: DailyGoalCommandServiceTest 단위 테스트 수정
* test: TripReportCommandServiceTest 단위 테스트 수정
* test: TripReportStudyLogCommandServiceTest 단위 테스트 수정

* test: StampQueryServiceTest에 GetNextStampOrderByTrip 단위 테스트 추가
* test: StampQueryServiceTest에 GetStampsToShiftAfterDeleted 단위 테스트 추가
* test: StampCommandServiceTest에 ShiftStampOrders 단위 테스트 추가

* test: StampFixture에 createStampWithName 메서드 추가
Copy link
Contributor

@hisonghy hisonghy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QueryDSL 레포지토리까지 분리하면서 더 코드가 깔끔해졌네요!
고샹하셨습니다 병합부탁드려요~

@chaiminwoo0223 chaiminwoo0223 merged commit 2155080 into develop Nov 4, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪄refactor 기능 개선 및 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🪄[REFACTOR]: QueryDSL Repository를 CommandRepository와 QueryRepository로 분리

3 participants