Repository navigation
fix: 대시보드 정류장 집계에서 비활성 정류장 제외 및 recentStations null 수정 - #36
Merged
Merged
Conversation
s26047-code
approved these changes
Sep 28, 2026
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.
📝 작업 내용
대시보드 API에서 정류장 수가 실제보다 많게 나오고 최근 등록 정류장 목록이 비어서 내려오던 버그 수정했습니다.
🔧 변경 사항
DashboardResponse: 생성자 파라미터 오타(recetStations→recentStations) 수정this.recentStations = recentStations가 필드에 자기 자신을 대입해서, 응답의recentStations가 항상null이었음recentStations필드에final추가DashboardStationRepository: 활성 정류장만 조회하는 메서드 추가countByActiveTrue()findTop5ByActiveTrueOrderByCreatedAtDesc()(기존findTop5ByOrderByCreatedAtDesc()대체)DashboardService: 정류장 개수와 최근 등록 목록을 위 메서드로 조회하도록 변경active = false)라서, 기존count()가 삭제된 정류장까지 세고 있었음🧪 테스트 방법
GET /manage/dashboard호출totalStationCount가 정류장 관리 화면의 실제 개수와 같은지 확인 (DB 기준active = 1인 정류장 수)recentStations에 활성 정류장이 최신 등록 순으로 최대 5개 내려오는지 확인totalStationCount가 줄고, 삭제한 정류장이recentStations에서 빠지는지 확인