Conversation
Walkthrough출석 관리 서비스에서 8교시와 10교시의 시간 설정이 조정되었습니다. 8교시 시작 시간이 16:40에서 16:30으로 변경되어 10분 연장되었고, 10교시 종료 시간이 20:30에서 20:31로 1분 연장되었습니다. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can disable the changed files summary in the walkthrough.Disable the |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/kotlin/dsm/pick2024/domain/attendance/domain/service/AttendanceService.kt (1)
49-51:⚠️ Potential issue | 🟡 Minor검증 로직과 10교시 종료 시간 불일치
checkApplicationTime에서endTime > LocalTime.of(20, 30)검증은 20:30 이후 시간을 거부하지만, 10교시 종료 시간은 20:31로 변경되었습니다.TIME 타입으로 20:30~20:31 사이 종료 시간을 신청하면 검증에서 거부되어 10교시 마지막 1분을 사용할 수 없게 됩니다.
🔧 검증 로직 수정 제안
if (startTime > endTime || - endTime > LocalTime.of(20, 30) || + endTime > LocalTime.of(20, 31) || startTime < LocalTime.of(8, 30) ) {🤖 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 49 - 51, The time-validation in checkApplicationTime incorrectly rejects end times up to 20:31; update the upper bound check that currently uses LocalTime.of(20, 30) so the method allows endTime == 20:31 (e.g. change endTime > LocalTime.of(20, 30) to endTime > LocalTime.of(20, 31) or use an equivalent isAfter/isBefore comparison), ensuring the check in AttendanceService.checkApplicationTime uses LocalTime.of(20, 31) for the 10th-period end-time limit while leaving the other conditions (startTime and lower bound) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@src/main/kotlin/dsm/pick2024/domain/attendance/domain/service/AttendanceService.kt`:
- Around line 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.
---
Outside diff comments:
In
`@src/main/kotlin/dsm/pick2024/domain/attendance/domain/service/AttendanceService.kt`:
- Around line 49-51: The time-validation in checkApplicationTime incorrectly
rejects end times up to 20:31; update the upper bound check that currently uses
LocalTime.of(20, 30) so the method allows endTime == 20:31 (e.g. change endTime
> LocalTime.of(20, 30) to endTime > LocalTime.of(20, 31) or use an equivalent
isAfter/isBefore comparison), ensuring the check in
AttendanceService.checkApplicationTime uses LocalTime.of(20, 31) for the
10th-period end-time limit while leaving the other conditions (startTime and
lower bound) unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f8ab4109-f5c9-41bc-a42a-73ce1ccc399e
📒 Files selected for processing (1)
src/main/kotlin/dsm/pick2024/domain/attendance/domain/service/AttendanceService.kt
| 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교시 |
There was a problem hiding this comment.
🧩 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 kotlinRepository: 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 kotlinRepository: 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 kotlinRepository: 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
doneRepository: 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 kotlinRepository: DSM-PICK/PiCK_CORE_SERVER
Length of output: 51
QueryClubAllAttendanceService.kt의 8, 9, 10교시 정의 업데이트 필요
AttendanceService.kt의 교시 정의가 변경되었으나, QueryClubAllAttendanceService.kt의 정의가 동기화되지 않았습니다.
필요한 수정:
- 8교시:
16:40 to 18:30→16:30 to 18:40 - 9교시:
18:40 to 19:30→18:40 to 19:40 - 10교시:
19:40 to 20:30→19: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.
There was a problem hiding this comment.
아닙니다. 시간 이게 맞습니다. 점심, 저녁시간으로 인해 시간이 변경될 수 있습니다.
There was a problem hiding this comment.
@ByunDohwi, 이해했습니다. 점심 및 저녁 시간으로 인해 QueryClubAllAttendanceService.kt와 AttendanceService.kt의 교시 시간 정의가 의도적으로 다를 수 있군요. 설명해 주셔서 감사합니다. 제 코멘트가 잘못된 판단이었습니다. 죄송합니다!
📝 Learnings were identified and not saved (knowledge base disabled). Enable
기존 교시에서 16:30~16:40에 시간으로 신청 시, 교시로 변환되지 않는 오류가 있었습니다.
Summary by CodeRabbit
버그 수정