From ab877beae11941c2b7ee87fb081cef254699f7d1 Mon Sep 17 00:00:00 2001 From: Klaus Date: Mon, 21 Jul 2025 15:48:40 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EB=A9=94?= =?UTF-8?q?=EC=9D=B8=20API=20-=20redis=20caching=EC=9D=B4=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9=EB=90=9C=20data=20class=EC=97=90=20@JsonProperty=20?= =?UTF-8?q?=EC=95=A0=EB=85=B8=ED=85=8C=EC=9D=B4=EC=85=98=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sodalive/api/live/LiveApiService.kt | 2 +- .../sodalive/content/AudioContentMainItem.kt | 2 +- .../GetCommunityPostListResponse.kt | 33 ++++++++++--------- .../room/GetLatestFinishedLiveResponse.kt | 11 ++++--- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/api/live/LiveApiService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/api/live/LiveApiService.kt index d7d60e2..bce1c34 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/api/live/LiveApiService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/api/live/LiveApiService.kt @@ -55,7 +55,7 @@ class LiveApiService( val latestFinishedLiveList = liveService.getLatestFinishedLive(member) .map { if (memberId != null) { - it.isFollowing = explorerQueryRepository.getCreatorFollowing( + it.following = explorerQueryRepository.getCreatorFollowing( creatorId = it.memberId, memberId = memberId )?.isFollow ?: false diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentMainItem.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentMainItem.kt index 6329435..9f384d9 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentMainItem.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentMainItem.kt @@ -9,5 +9,5 @@ data class AudioContentMainItem @QueryProjection constructor( @JsonProperty("title") val title: String, @JsonProperty("coverImageUrl") val coverImageUrl: String, @JsonProperty("creatorNickname") val creatorNickname: String, - @JsonProperty("isPointAvailable") val isPointAvailable: Boolean + @get:JsonProperty("isPointAvailable") val isPointAvailable: Boolean ) 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..241dc86 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 @@ -1,23 +1,24 @@ package kr.co.vividnext.sodalive.explorer.profile.creatorCommunity +import com.fasterxml.jackson.annotation.JsonProperty import com.querydsl.core.annotations.QueryProjection import kr.co.vividnext.sodalive.explorer.profile.creatorCommunity.comment.GetCommunityPostCommentListItem data class GetCommunityPostListResponse @QueryProjection constructor( - val postId: Long, - val creatorId: Long, - val creatorNickname: String, - val creatorProfileUrl: String, - val imageUrl: String?, - val audioUrl: String?, - val content: String, - val price: Int, - val date: String, - val isCommentAvailable: Boolean, - val isAdult: Boolean, - val isLike: Boolean, - val existOrdered: Boolean, - val likeCount: Int, - val commentCount: Int, - val firstComment: GetCommunityPostCommentListItem? + @JsonProperty("postId") val postId: Long, + @JsonProperty("creatorId") val creatorId: Long, + @JsonProperty("creatorNickname") val creatorNickname: String, + @JsonProperty("creatorProfileUrl") val creatorProfileUrl: String, + @JsonProperty("imageUrl") val imageUrl: String?, + @JsonProperty("audioUrl") val audioUrl: String?, + @JsonProperty("content") val content: String, + @JsonProperty("price") val price: Int, + @JsonProperty("date") val date: String, + @get:JsonProperty("isCommentAvailable") val isCommentAvailable: Boolean, + @get:JsonProperty("isAdult") val isAdult: Boolean, + @get:JsonProperty("isLike") val isLike: Boolean, + @JsonProperty("existOrdered") val existOrdered: Boolean, + @JsonProperty("likeCount") val likeCount: Int, + @JsonProperty("commentCount") val commentCount: Int, + @JsonProperty("firstComment") val firstComment: GetCommunityPostCommentListItem? ) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/GetLatestFinishedLiveResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/GetLatestFinishedLiveResponse.kt index 8f7f98f..8fb1272 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/GetLatestFinishedLiveResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/GetLatestFinishedLiveResponse.kt @@ -1,5 +1,6 @@ package kr.co.vividnext.sodalive.live.room +import com.fasterxml.jackson.annotation.JsonProperty import com.querydsl.core.annotations.QueryProjection import kr.co.vividnext.sodalive.extensions.getTimeAgoString import java.time.LocalDateTime @@ -12,11 +13,11 @@ data class GetLatestFinishedLiveQueryResponse @QueryProjection constructor( ) data class GetLatestFinishedLiveResponse( - val memberId: Long, - val nickname: String, - val profileImageUrl: String, - val timeAgo: String, - var isFollowing: Boolean = false + @JsonProperty("memberId") val memberId: Long, + @JsonProperty("nickname") val nickname: String, + @JsonProperty("profileImageUrl") val profileImageUrl: String, + @JsonProperty("timeAgo") val timeAgo: String, + @get:JsonProperty("following") var following: Boolean = false ) { constructor(response: GetLatestFinishedLiveQueryResponse) : this( response.memberId,