diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunity.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunity.kt index e22cee7..dd57df8 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunity.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunity.kt @@ -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, diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunityService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunityService.kt index 6698959..b71f666 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunityService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/CreatorCommunityService.kt @@ -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, diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/GetCommunityPostListResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/GetCommunityPostListResponse.kt index 81a5f22..7153f80 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/GetCommunityPostListResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/GetCommunityPostListResponse.kt @@ -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, diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/SelectCommunityPostResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/SelectCommunityPostResponse.kt index c290067..df6c657 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/SelectCommunityPostResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/profile/creatorCommunity/SelectCommunityPostResponse.kt @@ -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,