Merged
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough신입생 모집 알림 시스템을 구현하며, 관리자 인증 및 역할 기반 권한 관리를 강화했습니다. 스케줄링, REST API 엔드포인트, JPA 엔티티, 알림 처리 서비스, 데이터베이스 마이그레이션을 추가했습니다. Changes
Sequence Diagram(s)sequenceDiagram
actor Admin as 관리자
participant Controller as RecruitMemberMemoAdminController
participant AdminService as RecruitMemberMemoAdminService
participant NotifService as RecruitMemberMemoNotificationService
participant Repository as RecruitMemberMemoNotificationRepository
participant MailService as MailService
Admin->>Controller: POST /api/v1/admin/recruit/member/memo/notifications/opening
Controller->>AdminService: enqueueOpeningNotifications(request)
AdminService->>NotifService: enqueueOpeningNotificationsForCurrentSemester(subject, body)
NotifService->>Repository: 배치 SQL 실행 (대상 계산 및 큐잉)
Repository-->>NotifService: 결과 반환 (distinctTargetCount, enqueuedCount)
NotifService-->>AdminService: RecruitMemberMemoNotificationEnqueueResult
AdminService-->>Controller: RecruitMemberMemoOpeningNotificationEnqueueResponse
Controller-->>Admin: 200 OK (ApiResponse)
Note over MailService: 스케줄러가 별도로 대기 중인 알림 처리
sequenceDiagram
participant Scheduler as RecruitMemberMemoNotificationScheduler
participant NotifService as RecruitMemberMemoNotificationService
participant Repository as RecruitMemberMemoNotificationRepository
participant MailService as MailService
Scheduler->>NotifService: processPendingNotifications()
NotifService->>Repository: findPendingBatchForUpdate(batchSize)
Repository-->>NotifService: 대기 중인 알림 리스트
loop 각 알림에 대해
NotifService->>MailService: sendPlainMail(email, subject, body)
alt 성공
MailService-->>NotifService: 메일 전송 완료
NotifService->>NotifService: markSent(notification)
else 실패
MailService-->>NotifService: 예외 발생
NotifService->>NotifService: markFailed(notification, maxAttempts, retryDelay)
end
end
NotifService->>Repository: saveAll(notifications)
Repository-->>NotifService: 저장 완료
sequenceDiagram
actor User as 사용자
participant AuthController as AuthController
participant AuthService as AuthService
participant AdminCredRepo as AdminCredentialRepository
participant PasswordEncoder as PasswordEncoder
participant TokenProvider as TokenProvider
User->>AuthController: POST /api/v1/auth/login/admin
AuthController->>AuthService: adminLogin(adminId, password)
AuthService->>AdminCredRepo: findByLoginId(adminId)
AdminCredRepo-->>AuthService: AdminCredential
AuthService->>PasswordEncoder: matches(password, passwordHash)
PasswordEncoder-->>AuthService: true/false
alt 자격증명 유효
AuthService->>TokenProvider: createAdminAccessToken(id, loginId, sessionId)
TokenProvider-->>AuthService: accessToken
AuthService->>AuthService: createRefreshToken(adminId)
AuthService-->>AuthController: LoginSuccessResponse
AuthController-->>User: 200 OK
else 자격증명 무효
AuthService-->>AuthController: IllegalArgumentException
AuthController-->>User: 401 Unauthorized
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 연관된 이슈
✨ 작업 내용
💬 리뷰 요구사항(선택)
Summary by CodeRabbit
릴리스 노트
새로운 기능
기타