-
Notifications
You must be signed in to change notification settings - Fork 1
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
#385 [feat] 글모임 삭제 API 구현 #387
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Service | ||
@Slf4j | ||
@RequiredArgsConstructor | ||
public class MoimDeleteService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1
DeleteService는 Controller에서 참조하면 안됩니다!
DeleteService와 같은 세부 역할은 MoimService를 타고 들어와야 합니다.
또한 기존에 말했던 Helper계층과 관련해서 MoimRemover로 클래스명을 변경한 뒤 빈 설정을 @Service
가 아닌 @Component
로 해주는 것이 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니다! 제가 착각을 하고 있었네요..ㅠ-ㅠ 감사합니다 :D
|
||
void deleteAllByMoim(final Moim moim); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3
성능을 위해 Jpql의 벌크 delete를 사용해도 좋을 것 같아요! 한 번 공부해보는 걸 추천 드립니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 :) 삭제 범위가 넓어서 큰 작업이네요!
코멘트 확인해주세요!
@@ -49,7 +49,6 @@ public void deleteMoim( | |||
curiousService.deleteAllByPosts(posts); | |||
postDeleteService.deletePosts(posts); | |||
topicService.deleteTopics(topics); | |||
writerNameDeleteService.deleteWriterNamesByMoim(moim); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2
혹시 이걸 지운 이유가 있을까요?
위에 Cascade 설정은 owner에만 걸려있어서 실제 owner가 아닌 writerName들에는 적용이 안될 것 같습니다!
@@ -49,7 +49,6 @@ public void deleteMoim( | |||
curiousService.deleteAllByPosts(posts); | |||
postDeleteService.deletePosts(posts); | |||
topicService.deleteTopics(topics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3
서비스들을 명명하거나 delete 메서드인데도 그냥 service를 보는 경우, deleteService를 보는 경우를 Remover로 정리해주어도 좋을 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
✒️ 관련 이슈번호
Key Changes 🔑
글모임 삭제 API 구현하였습니다!
To Reviewers 📢
글모임 삭제는
로 진행됩니다!