크리에이터 커뮤니티에 utc 시간 추가
This commit is contained in:
@@ -31,6 +31,7 @@ data class CreatorCommunity(
|
|||||||
audioUrl: String?,
|
audioUrl: String?,
|
||||||
content: String,
|
content: String,
|
||||||
date: String,
|
date: String,
|
||||||
|
dateUtc: String,
|
||||||
isLike: Boolean,
|
isLike: Boolean,
|
||||||
existOrdered: Boolean,
|
existOrdered: Boolean,
|
||||||
likeCount: Int,
|
likeCount: Int,
|
||||||
@@ -51,6 +52,7 @@ data class CreatorCommunity(
|
|||||||
content = content,
|
content = content,
|
||||||
price = price,
|
price = price,
|
||||||
date = date,
|
date = date,
|
||||||
|
dateUtc = dateUtc,
|
||||||
isCommentAvailable = isCommentAvailable,
|
isCommentAvailable = isCommentAvailable,
|
||||||
isAdult = false,
|
isAdult = false,
|
||||||
isLike = isLike,
|
isLike = isLike,
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import org.springframework.data.repository.findByIdOrNull
|
|||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
import org.springframework.transaction.annotation.Transactional
|
import org.springframework.transaction.annotation.Transactional
|
||||||
import org.springframework.web.multipart.MultipartFile
|
import org.springframework.web.multipart.MultipartFile
|
||||||
|
import java.time.ZoneId
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
class CreatorCommunityService(
|
class CreatorCommunityService(
|
||||||
@@ -243,6 +244,10 @@ class CreatorCommunityService(
|
|||||||
imageHost = imageHost,
|
imageHost = imageHost,
|
||||||
audioUrl = audioUrl,
|
audioUrl = audioUrl,
|
||||||
date = it.date.getTimeAgoString(),
|
date = it.date.getTimeAgoString(),
|
||||||
|
dateUtc = it.date
|
||||||
|
.atZone(ZoneId.of("UTC"))
|
||||||
|
.toInstant()
|
||||||
|
.toString(),
|
||||||
isLike = isLike,
|
isLike = isLike,
|
||||||
memberId = memberId,
|
memberId = memberId,
|
||||||
existOrdered = if (memberId == it.creatorId) {
|
existOrdered = if (memberId == it.creatorId) {
|
||||||
@@ -314,6 +319,10 @@ class CreatorCommunityService(
|
|||||||
imageHost = imageHost,
|
imageHost = imageHost,
|
||||||
audioUrl = audioUrl,
|
audioUrl = audioUrl,
|
||||||
date = post.date.getTimeAgoString(),
|
date = post.date.getTimeAgoString(),
|
||||||
|
dateUtc = post.date
|
||||||
|
.atZone(ZoneId.of("UTC"))
|
||||||
|
.toInstant()
|
||||||
|
.toString(),
|
||||||
isLike = isLike,
|
isLike = isLike,
|
||||||
memberId = memberId,
|
memberId = memberId,
|
||||||
existOrdered = if (memberId == post.creatorId) {
|
existOrdered = if (memberId == post.creatorId) {
|
||||||
@@ -494,6 +503,10 @@ class CreatorCommunityService(
|
|||||||
imageHost = imageHost,
|
imageHost = imageHost,
|
||||||
audioUrl = null,
|
audioUrl = null,
|
||||||
date = it.date.getTimeAgoString(),
|
date = it.date.getTimeAgoString(),
|
||||||
|
dateUtc = it.date
|
||||||
|
.atZone(ZoneId.of("UTC"))
|
||||||
|
.toInstant()
|
||||||
|
.toString(),
|
||||||
isLike = isLike,
|
isLike = isLike,
|
||||||
memberId = memberId,
|
memberId = memberId,
|
||||||
existOrdered = if (memberId == it.creatorId) {
|
existOrdered = if (memberId == it.creatorId) {
|
||||||
@@ -578,6 +591,10 @@ class CreatorCommunityService(
|
|||||||
audioUrl = audioUrl,
|
audioUrl = audioUrl,
|
||||||
content = post.content,
|
content = post.content,
|
||||||
date = post.createdAt!!.getTimeAgoString(),
|
date = post.createdAt!!.getTimeAgoString(),
|
||||||
|
dateUtc = post.createdAt!!
|
||||||
|
.atZone(ZoneId.of("UTC"))
|
||||||
|
.toInstant()
|
||||||
|
.toString(),
|
||||||
isLike = isLike,
|
isLike = isLike,
|
||||||
existOrdered = true,
|
existOrdered = true,
|
||||||
likeCount = likeCount,
|
likeCount = likeCount,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ data class GetCommunityPostListResponse @QueryProjection constructor(
|
|||||||
val content: String,
|
val content: String,
|
||||||
val price: Int,
|
val price: Int,
|
||||||
val date: String,
|
val date: String,
|
||||||
|
val dateUtc: String,
|
||||||
val isCommentAvailable: Boolean,
|
val isCommentAvailable: Boolean,
|
||||||
val isAdult: Boolean,
|
val isAdult: Boolean,
|
||||||
val isLike: Boolean,
|
val isLike: Boolean,
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ data class SelectCommunityPostResponse @QueryProjection constructor(
|
|||||||
imageHost: String,
|
imageHost: String,
|
||||||
audioUrl: String?,
|
audioUrl: String?,
|
||||||
date: String,
|
date: String,
|
||||||
|
dateUtc: String,
|
||||||
isLike: Boolean,
|
isLike: Boolean,
|
||||||
memberId: Long,
|
memberId: Long,
|
||||||
existOrdered: Boolean,
|
existOrdered: Boolean,
|
||||||
@@ -57,6 +58,7 @@ data class SelectCommunityPostResponse @QueryProjection constructor(
|
|||||||
},
|
},
|
||||||
price = price,
|
price = price,
|
||||||
date = date,
|
date = date,
|
||||||
|
dateUtc = dateUtc,
|
||||||
isCommentAvailable = isCommentAvailable,
|
isCommentAvailable = isCommentAvailable,
|
||||||
isAdult = isAdult,
|
isAdult = isAdult,
|
||||||
isLike = isLike,
|
isLike = isLike,
|
||||||
|
|||||||
Reference in New Issue
Block a user