generated from pricelees/issue-pr-template
refactor: 미사용 코드 제거
This commit is contained in:
parent
0b8963b8c5
commit
232e7882de
@ -48,15 +48,4 @@ class AdminService(
|
||||
AuditConstant.UNKNOWN_OPERATOR
|
||||
}
|
||||
}
|
||||
|
||||
private fun findOrThrow(id: Long): AdminEntity {
|
||||
log.info { "[AdminService.findOrThrow] 조회 시작: id=${id}" }
|
||||
|
||||
return adminRepository.findByIdOrNull(id)
|
||||
?.also { log.info { "[AdminService.findOrThrow] 조회 완료: id=${id}, name=${it.name}" } }
|
||||
?: run {
|
||||
log.info { "[AdminService.findOrThrow] 조회 실패: id=${id}" }
|
||||
throw AdminException(AdminErrorCode.ADMIN_NOT_FOUND)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,30 +57,6 @@ class JacksonConfig {
|
||||
return simpleModule
|
||||
}
|
||||
|
||||
class LongToStringSerializer : JsonSerializer<Long>() {
|
||||
override fun serialize(value: Long?, gen: JsonGenerator, serializers: SerializerProvider) {
|
||||
if (value == null) {
|
||||
gen.writeNull()
|
||||
} else {
|
||||
gen.writeString(value.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class StringToLongDeserializer : JsonDeserializer<Long>() {
|
||||
override fun deserialize(p: JsonParser, ctxt: DeserializationContext): Long? {
|
||||
val text = p.text
|
||||
if (text.isNullOrBlank()) {
|
||||
return null
|
||||
}
|
||||
return try {
|
||||
text.toLong()
|
||||
} catch (_: NumberFormatException) {
|
||||
throw RoomescapeException(CommonErrorCode.INVALID_INPUT_VALUE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class LocalDateTimeSerializer : JsonSerializer<LocalDateTime>() {
|
||||
override fun serialize(
|
||||
value: LocalDateTime,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user