Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class AttendanceService {
LocalTime.of(13, 30) to LocalTime.of(14, 40), // 5교시
LocalTime.of(14, 30) to LocalTime.of(15, 30), // 6교시
LocalTime.of(15, 30) to LocalTime.of(16, 30), // 7교시
LocalTime.of(16, 40) to LocalTime.of(18, 40), // 8교시
LocalTime.of(16, 30) to LocalTime.of(18, 40), // 8교시
LocalTime.of(18, 40) to LocalTime.of(19, 40), // 9교시
LocalTime.of(19, 40) to LocalTime.of(20, 30) // 10교시
LocalTime.of(19, 40) to LocalTime.of(20, 31) // 10교시
Comment on lines +22 to +24
Copy link

@coderabbitai coderabbitai bot Mar 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: 교시 시간 정의가 있는 모든 파일 검색

# 16:40 (기존 8교시 시작 시간) 또는 20:30 (기존 10교시 종료 시간) 정의 검색
rg -n "LocalTime\.of\s*\(\s*16\s*,\s*40\s*\)" --type kotlin
rg -n "LocalTime\.of\s*\(\s*20\s*,\s*30\s*\)" --type kotlin

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 525


🏁 Script executed:

# Get more context from AttendanceService.kt around the period definitions and validation
cat -n src/main/kotlin/dsm/pick2024/domain/attendance/domain/service/AttendanceService.kt | sed -n '15,55p'

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 2151


🏁 Script executed:

# Get the period definitions from QueryClubAllAttendanceService.kt
cat -n src/main/kotlin/dsm/pick2024/domain/attendance/service/QueryClubAllAttendanceService.kt | sed -n '15,35p'

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 1135


🏁 Script executed:

# Search for all files that define periods with LocalTime
rg -l "period[0-9]" --type kotlin

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 1301


🏁 Script executed:

# Search for any other references to 16:30 (new period 8 start) or 20:31 (new period 10 end)
rg -n "LocalTime\.of\s*\(\s*16\s*,\s*30\s*\)" --type kotlin
rg -n "LocalTime\.of\s*\(\s*20\s*,\s*31\s*\)" --type kotlin

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 679


🏁 Script executed:

# Check if other service files define periods
for file in src/main/kotlin/dsm/pick2024/domain/attendance/service/ResetAttendanceService.kt \
            src/main/kotlin/dsm/pick2024/domain/attendance/service/QueryClassAttendanceService.kt \
            src/main/kotlin/dsm/pick2024/domain/attendance/service/QueryClubAttendanceService.kt \
            src/main/kotlin/dsm/pick2024/domain/attendance/service/ChangeAttendanceService.kt \
            src/main/kotlin/dsm/pick2024/domain/attendance/service/ChangeAllAttendanceService.kt; do
  echo "=== $file ==="
  rg -n "period|LocalTime\.of" "$file" | head -20
done

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 2818


🏁 Script executed:

# Check if there are any usages of QueryClubAllAttendanceService's periods
rg -n "QueryClubAllAttendanceService\.period" --type kotlin

Repository: DSM-PICK/PiCK_CORE_SERVER

Length of output: 51


QueryClubAllAttendanceService.kt의 8, 9, 10교시 정의 업데이트 필요

AttendanceService.kt의 교시 정의가 변경되었으나, QueryClubAllAttendanceService.kt의 정의가 동기화되지 않았습니다.

필요한 수정:

  • 8교시: 16:40 to 18:3016:30 to 18:40
  • 9교시: 18:40 to 19:3018:40 to 19:40
  • 10교시: 19:40 to 20:3019:40 to 20:31

추가로 AttendanceService.kt line 50의 검증도 수정 필요:

  • 현재: endTime > LocalTime.of(20, 30)
  • 수정: endTime > LocalTime.of(20, 31)

동기화 실패 시 16:3016:40, 18:3019:30, 20:30~20:31 구간에서 InvalidTimeException 발생.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/kotlin/dsm/pick2024/domain/attendance/domain/service/AttendanceService.kt`
around lines 22 - 24, QueryClubAllAttendanceService's period definitions are out
of sync with AttendanceService: update the period ranges in
QueryClubAllAttendanceService (the entries defining 8th/9th/10th periods) to
match AttendanceService: set 8교시 to LocalTime.of(16,30) to LocalTime.of(18,40),
9교시 to LocalTime.of(18,40) to LocalTime.of(19,40), and 10교시 to
LocalTime.of(19,40) to LocalTime.of(20,31); also update the validation in
AttendanceService where endTime is compared (replace the check endTime >
LocalTime.of(20,30) with endTime > LocalTime.of(20,31)) so the two services are
synchronized and avoid InvalidTimeException in the 16:30–16:40, 18:30–19:30, and
20:30–20:31 gaps.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아닙니다. 시간 이게 맞습니다. 점심, 저녁시간으로 인해 시간이 변경될 수 있습니다.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ByunDohwi, 이해했습니다. 점심 및 저녁 시간으로 인해 QueryClubAllAttendanceService.ktAttendanceService.kt의 교시 시간 정의가 의도적으로 다를 수 있군요. 설명해 주셔서 감사합니다. 제 코멘트가 잘못된 판단이었습니다. 죄송합니다!


📝 Learnings were identified and not saved (knowledge base disabled). Enable

)
val periodNames = listOf(
"1교시", "2교시", "3교시", "4교시", "5교시",
Expand Down
Loading