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