fix(gift): 수령확인 시각을 초 단위로 정규화한다

This commit is contained in:
2026-10-26 12:02:34 +09:00
parent 52e5c97423
commit c97b028dd5
2 changed files with 55 additions and 1 deletions
@@ -18,6 +18,7 @@ import org.springframework.data.repository.findByIdOrNull
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
import java.time.LocalDateTime
import java.time.temporal.ChronoUnit
data class GiftApplicationCommand(
val recipientMemberId: Long,
@@ -297,7 +298,7 @@ class GiftCommandService(
throw invalidRequest()
}
val delivery = deliveryRepository.findByGiftIdForUpdate(gift.id ?: throw invalidRequest()) ?: throw invalidRequest()
val deliveredAt = now()
val deliveredAt = now().truncatedTo(ChronoUnit.SECONDS)
gift.status = GiftStatus.DELIVERED
delivery.deliveredAt = deliveredAt