Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REFACTOR] MemberService 순환 참조 문제 #272

Merged
merged 8 commits into from
May 23, 2024

Conversation

Chan531
Copy link
Contributor

@Chan531 Chan531 commented May 22, 2024

✨ Related Issue

📝 기능 구현 명세

image

  • 멤버 프로필 생성 api

image

  • 회원 탈퇴 api

🐥 추가적인 언급 사항

  • 코드 리팩토링 후 멤버 프로필 생성 테스트가 잘 돌아가지 않는데 이는 멤버 통합 테스트에서 진행하는 것이 맞다 생각해 일단 주석처리 해놨습니다.
  • 일단 MemberRoutineService와 MemberDollService에서 하던 일을 그대로 가져온 거라 따로 검증은 하지 않았는데 너무 위험한 행동일까요...?

@Chan531 Chan531 added chan 찬 작업 refactor labels May 22, 2024
@Chan531 Chan531 requested a review from thguss May 22, 2024 12:26
@Chan531 Chan531 self-assigned this May 22, 2024
Copy link
Member

@thguss thguss left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!
merge 작업 전에 변경된 부분 테스트 코드나 포스트맨으로 한 번 테스트해보면 좋을 것 같아요~
큰 문제는 없어보여서 우선 승인해둘게요! 반영할 리뷰 있으면 반영 및 테스트 후 merge 해주세요~

Comment on lines 14 to 16
public void deleteMember(Member member) {
memberRepository.delete(member);
}
Copy link
Member

Choose a reason for hiding this comment

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

  1. 메서드 이름은 delete로 간결하게 표현해도 좋을 것 같아요.
  2. 연관관계 관련해서 delete 기능이 잘 동작하는 지 테스트 코드나 포스트맨으로 테스트 한 번 돌려보면 좋을 것 같아요 :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

둘 다 완료했습니다!

return memberRepository.findById(id)
.orElseThrow(() -> new MemberException(INVALID_MEMBER));
private void createDailyRoutines(Member member, List<Long> routineIds) {
routineIds.forEach(id -> memberRoutineSaver.checkHasDeletedAndSave(member, routineFinder.findById(id)));
Copy link
Member

Choose a reason for hiding this comment

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

routineFinder.findById(id) 부분은 변수로 빼면 더 직관적일 것 같아요

Copy link
Contributor Author

@Chan531 Chan531 May 23, 2024

Choose a reason for hiding this comment

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

메소드로 말씀이신가요??

@Chan531 Chan531 merged commit c282497 into develop May 23, 2024
1 check passed
@Chan531 Chan531 deleted the refactor/#271-member-service branch May 23, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REFACTOR] MemberService 순환참조
2 participants