-
Notifications
You must be signed in to change notification settings - Fork 3
[Refactor][jjaeroong]: 탈퇴 사용자 팟 멤버, 채팅, 댓글 응답 시 새싹 제거하여 반환(#404) #415
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
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough여러 저장소/컨버터/엔티티에 삭제·닉네임 표기 로직을 추가·정비하고, 사용자 탈퇴(UserCommandServiceImpl) 흐름을 대폭 개편했습니다. 포트/채팅/저장 기록의 일괄 조회·삭제 메서드가 추가되었고, 에러 코드가 보강되었습니다. 채팅 삭제 신호 발송 메서드와 DTO 변환 시 이름/역할 처리 조건이 변경되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
actor U as User
participant UC as UserCommandServiceImpl
participant PR as PotRepository
participant PM as PotMemberRepository
participant PA as PotApplicationRepository
participant PRD as PotRecruitmentDetailsRepository
participant PS as PotSaveRepository
participant CR as ChatRoomRepository
participant CC as ChatCommandService
U->>UC: deleteUser()
UC->>PR: findIdsByUserIdAndStatus(userId, COMPLETED/RECRUITING)
UC->>PR: findIdsByUserIdAndStatusNotIn(userId, [COMPLETED, RECRUITING])
alt has OTHER status pots
UC-->>U: throw POT_OWNERSHIP_TRANSFER_REQUIRED
else proceed
UC->>PRD: deleteByPotIds(recruitingIds)
UC->>PA: deleteByPotIds(recruitingIds)
UC->>PR: deleteByUserIdAndPotIds(userId, recruitingIds)
UC->>PM: deleteByUserIdAndPotIdIn(userId, ongoingIds)
UC->>CR: findIdsByPotIdIn(ongoingIds)
UC->>CC: deleteChatMessage(userId, chatRoomId)* (loop)
UC->>PS: deleteByUser(user)
UC-->>U: soft delete user
end
sequenceDiagram
participant S as ChatService
participant SS as ChatSendService
participant MB as MessageBroker
participant C as Clients
S->>SS: deleteMessage(chatRoomId, chatId)
SS->>MB: convertAndSend("/sub/chat/"+chatRoomId, "DELETE_"+chatId)
MB-->>C: Broadcast deletion signal
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (20)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
PR 타입(하나 이상의 PR 타입을 선택해주세요)
반영 브랜치
ex) feat/login -> dev
작업 내용
ex) 로그인 시, 구글 소셜 로그인 기능을 추가했습니다.
테스트 결과
ex) 베이스 브랜치에 포함되기 위한 코드는 모두 정상적으로 동작해야 합니다. 결과물에 대한 스크린샷, GIF, 혹은 라이브
Summary by CodeRabbit