Skip to content

fix: resolve grade 1 room view showing 0/0 by using overlapping check…#119

Open
redjungi09 wants to merge 1 commit intomainfrom
fix/grade1-room-view-checkpoint
Open

fix: resolve grade 1 room view showing 0/0 by using overlapping check…#119
redjungi09 wants to merge 1 commit intomainfrom
fix/grade1-room-view-checkpoint

Conversation

@redjungi09
Copy link
Copy Markdown
Contributor

#️⃣연관된 이슈

#87

📝작업 내용

문제

1학년 학생이 출석 시 getOrCreateSchedule이 grade-specific 체크포인트("78교시", "9교시")로 schedule을 저장하는데, 선생님이 room 뷰 조회 시 getCurrentCheckpointOrNearest()가 grade-unaware하게 일반 체크포인트("89교시")를 반환하여 schedule join 조건이 맞지 않아 1학년 학생이 전혀 조회되지 않는 문제 (0/0)

변경 사항

CheckpointResolver

  • getCurrentCheckpointOrNull(), getCurrentCheckpointOrNearest()에서 general 체크포인트(grade == null && dayOfWeek == null)만 사용하도록 변경
  • 기존에는 grade-specific 체크포인트("7~8교시", "9교시")가 포함되어 선생님 뷰에서 비결정적 동작 발생

AttendanceQueryRepository

  • room 필터 시 schedule join 조건을 단일 checkpoint.id.eq() → 시간이 겹치는 체크포인트 ID 목록 checkpoint.id.in()으로 변경
  • "89교시"(16:3018:59)와 시간이 겹치는 "78교시"(15:2017:19), "9교시"(17:20~18:10)도 조건에 포함되어 1학년 학생 정상 조회
  • 중복 유저 방지를 위해 .distinct() 추가

💬리뷰 요구사항(선택)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants