Skip to content

refactor: EmotionBandArchiveService#35

Merged
mjkhub merged 2 commits intomainfrom
refactor/archive-service
Jul 2, 2025
Merged

refactor: EmotionBandArchiveService#35
mjkhub merged 2 commits intomainfrom
refactor/archive-service

Conversation

@sudo-Terry
Copy link
Copy Markdown
Member

  • 유효성 검사를 마찬가지로 EntityValidator에게 위임한다
    • 테스트에서 유효성 검사에 대한 단위 테스트를 제거, 서비스 로직만 검증한다
  • 반복되는 코드를 메소드를 추출
    • 연관 객체 필드 업데이트
  • 네이밍 변경

- 유효성 검사를 마찬가지로 EntityValidator에게 위임한다
  - 테스트에서 유효성 검사에 대한 단위 테스트를 제거, 서비스 로직만 검증한다
- 반복되는 코드를 메소드를 추출
  - 연관 객체 필드 업데이트
- 네이밍 변경
@sudo-Terry sudo-Terry force-pushed the refactor/archive-service branch from 04260dd to 89d452b Compare July 2, 2025 14:05
@sudo-Terry sudo-Terry requested a review from mjkhub July 2, 2025 14:10
@sudo-Terry
Copy link
Copy Markdown
Member Author

동시성 문제가 여기도 있는데 이건 후속 pr 날려서 할게요

emotionBandRepository.save(updatedEmotionBand);
memberRepository.save(updatedMember);

updateCounts(emotionBand, member, false);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

지금 봤는데, 이렇게 감정밴드 보관, 취소 로직을 한번에 태우는 흐름이 좋은 것 같습니다!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@sudo-Terry 고생하셨습니다! 예전보다 훨씬 깔끔해진 것 같아요.

엇 동시성 문제는 조용히 넘어가려고 했는데, 좋습니다! 저도 후속 PR 날려볼게요

@mjkhub mjkhub merged commit ce92200 into main Jul 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants