Skip to content

[DP-310] 히스토리 조회 500 오류 수정#125

Merged
nYeonG4001 merged 2 commits intodevelopV2from
auto/fix/DP-310-history-null-date-type-error
Apr 12, 2026
Merged

[DP-310] 히스토리 조회 500 오류 수정#125
nYeonG4001 merged 2 commits intodevelopV2from
auto/fix/DP-310-history-null-date-type-error

Conversation

@nYeonG4001
Copy link
Copy Markdown
Collaborator

Summary

  • GET /history (학습/활동) 조회 시 500 오류 발생 버그 수정
  • 원인: JPQL에서 (:startDate IS NULL OR h.createdAt >= :startDate) 패턴 사용 시 PostgreSQL이 null 파라미터의 타입을 추론하지 못해 ERROR: could not determine data type of parameter $7 발생
  • 해결: null 여부에 따라 날짜 조건 없는 쿼리/있는 쿼리로 분기 처리

Changes

  • HistoryRepository: IS NULL 조건 제거, 날짜 유무에 따른 전용 메서드 추가 (findHistoryIdsByActionTypes, findHistoryIdsExcludingContentLiked, findAllHistoryIds)
  • HistoryService: null 날짜 여부에 따라 적절한 레포지토리 메서드 호출로 분기
  • HistoryServiceTest: 변경된 메서드 시그니처에 맞게 mock 기댓값 수정

Test plan

  • HistoryServiceTest 전체 통과 확인
  • ./gradlew build 성공 확인
  • 배포 후 GET /history 학습/활동 탭 정상 조회 확인

Fixes: 학습/활동 히스토리 500 오류 (배지 탭은 날짜 파라미터 없어서 정상 작동)

@sonarqubecloud
Copy link
Copy Markdown

@nYeonG4001 nYeonG4001 merged commit 9011236 into developV2 Apr 12, 2026
3 checks passed
@nYeonG4001 nYeonG4001 deleted the auto/fix/DP-310-history-null-date-type-error branch April 12, 2026 13:50
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.

1 participant