generated from pricelees/issue-pr-template
refactor: ScheduleValidator의 로그 매시지에서의 클래스명 제거
This commit is contained in:
parent
8215492eea
commit
1c700130c4
@ -26,7 +26,7 @@ class ScheduleValidator(
|
||||
val status: ScheduleStatus = schedule.status
|
||||
|
||||
if (status !in listOf(ScheduleStatus.AVAILABLE, ScheduleStatus.BLOCKED)) {
|
||||
log.info { "[ScheduleValidator.validateCanDelete] 삭제 실패: id=${schedule.id} / status=${status}" }
|
||||
log.info { "[validateCanDelete] 삭제 실패: id=${schedule.id} / status=${status}" }
|
||||
throw ScheduleException(ScheduleErrorCode.SCHEDULE_IN_USE)
|
||||
}
|
||||
}
|
||||
@ -51,7 +51,7 @@ class ScheduleValidator(
|
||||
private fun validateAlreadyExists(storeId: Long, date: LocalDate, themeId: Long, time: LocalTime) {
|
||||
if (scheduleRepository.existsDuplicate(storeId, date, themeId, time)) {
|
||||
log.info {
|
||||
"[ScheduleValidator.validateAlreadyExists] 동일한 날짜, 테마, 시간 존재로 인한 실패: date=${date} / themeId=${themeId} / time=${time}"
|
||||
"[validateAlreadyExists] 동일한 날짜, 테마, 시간 존재로 인한 실패: date=${date} / themeId=${themeId} / time=${time}"
|
||||
}
|
||||
throw ScheduleException(ScheduleErrorCode.SCHEDULE_ALREADY_EXISTS)
|
||||
}
|
||||
@ -63,7 +63,7 @@ class ScheduleValidator(
|
||||
|
||||
if (inputDateTime.isBefore(now)) {
|
||||
log.info {
|
||||
"[ScheduleValidator.validateDateTime] 이전 시간 선택으로 인한 실패: date=${date} / time=${time}"
|
||||
"[validateDateTime] 이전 시간 선택으로 인한 실패: date=${date} / time=${time}"
|
||||
}
|
||||
throw ScheduleException(ScheduleErrorCode.PAST_DATE_TIME)
|
||||
}
|
||||
@ -73,7 +73,7 @@ class ScheduleValidator(
|
||||
scheduleRepository.findStoreSchedulesWithThemeByDate(storeId, date, themeId)
|
||||
.firstOrNull { it.containsTime(time) }
|
||||
?.let {
|
||||
log.info { "[ScheduleValidator.validateTimeNotConflict] 시간이 겹치는 일정 존재: conflictSchedule(Id=${it.id}, time=${it.time}~${it.getEndAt()})" }
|
||||
log.info { "[validateTimeNotConflict] 시간이 겹치는 일정 존재: conflictSchedule(Id=${it.id}, time=${it.time}~${it.getEndAt()})" }
|
||||
throw ScheduleException(ScheduleErrorCode.SCHEDULE_TIME_CONFLICT)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user