이벤트 조회
- 시작날짜, 종료날짜 format 'yyyy-MM-dd'로 변경
This commit is contained in:
@@ -14,6 +14,8 @@ import org.springframework.cache.annotation.Cacheable
|
||||
import org.springframework.data.domain.Pageable
|
||||
import org.springframework.stereotype.Service
|
||||
import org.springframework.transaction.annotation.Transactional
|
||||
import java.time.ZoneId
|
||||
import java.time.format.DateTimeFormatter
|
||||
|
||||
@Service
|
||||
class AudioContentMainService(
|
||||
@@ -107,6 +109,17 @@ class AudioContentMainService(
|
||||
type = it.type,
|
||||
thumbnailImageUrl = "$imageHost/${it.thumbnailImage}",
|
||||
eventItem = if (it.type == AudioContentBannerType.EVENT && it.event != null) {
|
||||
val dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd")
|
||||
val startDate = it.event!!.startDate
|
||||
.atZone(ZoneId.of("UTC"))
|
||||
.withZoneSameInstant(ZoneId.of("Asia/Seoul"))
|
||||
.format(dateTimeFormatter)
|
||||
|
||||
val endDate = it.event!!.endDate
|
||||
.atZone(ZoneId.of("UTC"))
|
||||
.withZoneSameInstant(ZoneId.of("Asia/Seoul"))
|
||||
.format(dateTimeFormatter)
|
||||
|
||||
EventItem(
|
||||
id = it.event!!.id!!,
|
||||
thumbnailImageUrl = if (!it.event!!.thumbnailImage.startsWith("https://")) {
|
||||
@@ -123,8 +136,8 @@ class AudioContentMainService(
|
||||
it.event!!.detailImage
|
||||
},
|
||||
popupImageUrl = null,
|
||||
startDate = it.event!!.startDate,
|
||||
endDate = it.event!!.endDate,
|
||||
startDate = startDate,
|
||||
endDate = endDate,
|
||||
link = it.event!!.link,
|
||||
title = it.event!!.title,
|
||||
isPopup = false
|
||||
|
Reference in New Issue
Block a user