feat(creator-profile-live): LiveRoomResponse에 utc 기반의 라이브 시작 시간 추가
This commit is contained in:
@@ -40,6 +40,7 @@ import java.time.LocalDate
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneId
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.Locale
|
||||
|
||||
@Repository
|
||||
class ExplorerQueryRepository(
|
||||
@@ -354,7 +355,6 @@ class ExplorerQueryRepository(
|
||||
creatorId: Long,
|
||||
userMember: Member,
|
||||
timezone: String,
|
||||
limit: Int,
|
||||
offset: Long = 0
|
||||
): List<LiveRoomResponse> {
|
||||
var where = liveRoom.member.id.eq(creatorId)
|
||||
@@ -393,6 +393,14 @@ class ExplorerQueryRepository(
|
||||
val beginDateTime = it.beginDateTime
|
||||
.atZone(ZoneId.of("UTC"))
|
||||
.withZoneSameInstant(ZoneId.of(timezone))
|
||||
.format(
|
||||
DateTimeFormatter
|
||||
.ofPattern("yyyy년 MM월 dd일 (E) a hh시 mm분")
|
||||
.withLocale(Locale.KOREAN)
|
||||
)
|
||||
|
||||
val beginDateTimeUtc = it.beginDateTime
|
||||
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
|
||||
|
||||
val isPaid = if (it.channelName != null) {
|
||||
val useCan = queryFactory
|
||||
@@ -416,9 +424,8 @@ class ExplorerQueryRepository(
|
||||
title = it.title,
|
||||
content = it.notice,
|
||||
isPaid = isPaid,
|
||||
beginDateTime = beginDateTime.format(
|
||||
DateTimeFormatter.ofPattern("yyyy.MM.dd E hh:mm a")
|
||||
),
|
||||
beginDateTime = beginDateTime,
|
||||
beginDateTimeUtc = beginDateTimeUtc,
|
||||
isAdult = it.isAdult,
|
||||
price = it.price,
|
||||
channelName = it.channelName,
|
||||
|
@@ -209,8 +209,7 @@ class ExplorerService(
|
||||
queryRepository.getLiveRoomList(
|
||||
creatorId,
|
||||
userMember = member,
|
||||
timezone = timezone,
|
||||
limit = 3
|
||||
timezone = timezone
|
||||
)
|
||||
} else {
|
||||
listOf()
|
||||
|
@@ -1,16 +1,12 @@
|
||||
package kr.co.vividnext.sodalive.explorer
|
||||
|
||||
data class GetLiveRoomAllResponse(
|
||||
val totalCount: Int,
|
||||
val liveRoomList: List<LiveRoomResponse>
|
||||
)
|
||||
|
||||
data class LiveRoomResponse(
|
||||
val roomId: Long,
|
||||
val title: String,
|
||||
val content: String,
|
||||
val isPaid: Boolean,
|
||||
val beginDateTime: String,
|
||||
val beginDateTimeUtc: String,
|
||||
val coverImageUrl: String,
|
||||
val isAdult: Boolean,
|
||||
val price: Int,
|
||||
|
Reference in New Issue
Block a user