fix(gift): 수령확인 시각을 초 단위로 정규화한다
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user