fix(achievement): 미션 집계에서 삭제된 유저 제외#275
Merged
Merged
Conversation
레벨 분포는 삭제 안 된 유저만 세지만, 미션 현황 집계 쿼리는 유저 삭제 여부를 확인하지 않아 소프트 삭제된 유저의 미션까지 카운트되던 문제 수정. User 조인 + deletedAt IS NULL 조건을 추가해 레벨 분포와 집계 기준을 통일. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
개요
미션 현황 통계가 삭제된 유저의 미션까지 집계하던 문제를 수정합니다.
배경
countByDeletedAtIsNull()로 삭제 안 된 유저만 집계user_missions전체를 집계 — 유저 삭제 여부를 확인하지 않음didit은 유저를 소프트 삭제(
deletedAt)하므로, 탈퇴 유저의 미션 row가 남아 두 통계의 기준이 어긋납니다. 탈퇴자가 쌓일수록 미션 현황이 실제보다 부풀려집니다.변경
countGroupByLevelAndStatus쿼리에User조인 +deletedAt IS NULL조건 추가 → 레벨 분포와 집계 기준 통일.영향
./gradlew test확인 권장🤖 Generated with Claude Code