Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSnYQGCPrqJBzJRuVVJHCm
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSnYQGCPrqJBzJRuVVJHCm
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSnYQGCPrqJBzJRuVVJHCm
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 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 |
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LSnYQGCPrqJBzJRuVVJHCm
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
경고 2회 누적 시 페널티 자동 생성 멤버 목록/상세에 경고 횟수 노출, 어드민 멤버 검색에 역할 필터 추가, 탈퇴·추방 멤버 정렬 수정, 페널티 score 필드 제거, QueryService 트랜잭션 컨벤션 정리를 진행합니다.
📝 Changes
What
Penaltyrow("누적경고 2회")가 생성되어 페널티 조회 API에 노출되도록 수정GET /admin/clubs/{clubId}/members)·상세(GET /admin/clubs/{clubId}/members/{clubMemberId}) 응답(ClubMemberResponse)에warningCount필드 추가GET /admin/clubs/{clubId}/members,.../members/search)에memberRole필터 파라미터 추가BANNED·LEFT멤버가 선택한 정렬 옵션과 무관하게 항상 맨 뒤에 오도록 수정score(점수) 필드를 요청/응답 DTO,Penalty엔티티, DB 컬럼까지 전부 제거 — 페널티/경고는 항상 1점씩 만부여됨@Transactional(readOnly = true)를 컨벤션대로 클래스 레벨로 통일 (메서드 레벨누락·중복 정리)
Why
ClubMember.penaltyCount만 증가하고 실제Penaltyrow가 생성되지 않아, 페널티 개수(카운터)와 페널티 조회 목록의 건수가 서로 달라지는 문제가 있었음warningCount가 응답에 없었음memberRole) 필터만 빠져 있어, 요청받은 필터 조건을 마저 채움일관성이 깨져 있었음
How
ClubMember.incrementWarningCount()가 전환 발생 횟수를 반환하도록 변경,SavePenaltyUseCase에서 그 횟수만큼PenaltyMapper.toAutoConvertedPenalty()로 생성한 자동전환 Penalty를 저장ClubMapper.toMemberResponse()에서club.warningEnabled가 true일 때만warningCount를 채워 반환 (mypage API와 동일한 규칙)ClubMemberRepository.findAdminMembers()JPQL에(:memberRole IS NULL OR cm.memberRole = :memberRole)조건 추가, 컨트롤러/서비스/Reader 시그니처에memberRole파라미터 전달ORDER BY맨 앞에CASE WHEN memberStatus IN (BANNED, LEFT) THEN 1 ELSE 0 END ASC조건을 추가해 상태 우선순위를 모든 정렬 옵션보다 먼저 적용Penalty엔티티·요청/응답 DTO에서score제거, Flyway 마이그레이션(V15)으로penalty.score컬럼 drop.ClubMember.incrementPenaltyCount()/incrementWarningCount()는 항상 +1, 삭제 시에는 기존decrementPenaltyCount()/decrementWarningCount()로 -1. 더 이상 쓰이지 않는adjustPenaltyCount/adjustWarningCount,UpdatePenaltyUseCase`의 점수 조정 로직은 삭제GetUserProfileQueryService,GetUserProfileAssignableClubQueryService,GetUserMyPageQueryService,GetUserAttendanceQueryService의 메서드 레벨@Transactional(readOnly = true)를 클래스 레벨로 이동,GetUserPostQueryService의 중복 애너테이션 제거📸 Screenshots / Logs
💡 Reviewer 참고사항
✅ Checklist