fix: 포인트 정책 생성 - endDate가 빈칸이면 null 처리

This commit is contained in:
Klaus 2025-04-23 16:55:58 +09:00
parent cb7917dc26
commit fa98138541
1 changed files with 8 additions and 4 deletions

View File

@ -26,10 +26,14 @@ data class CreatePointRewardPolicyRequest(
.atZone(ZoneId.of("Asia/Seoul")) .atZone(ZoneId.of("Asia/Seoul"))
.withZoneSameInstant(ZoneId.of("UTC")) .withZoneSameInstant(ZoneId.of("UTC"))
.toLocalDateTime(), .toLocalDateTime(),
endDate = LocalDateTime.parse(endDate, dateTimeFormatter).withSecond(59) endDate = if (endDate.isNotBlank()) {
LocalDateTime.parse(endDate, dateTimeFormatter).withSecond(59)
.atZone(ZoneId.of("Asia/Seoul")) .atZone(ZoneId.of("Asia/Seoul"))
.withZoneSameInstant(ZoneId.of("UTC")) .withZoneSameInstant(ZoneId.of("UTC"))
.toLocalDateTime(), .toLocalDateTime()
} else {
null
},
isActive = true isActive = true
) )
} }