fix: 라이브 메인 API

- redis caching이 적용된 data class에 @JsonProperty 애노테이션 추가
This commit is contained in:
Klaus 2025-07-21 15:48:40 +09:00
parent 046c163e6f
commit ab877beae1
4 changed files with 25 additions and 23 deletions

View File

@ -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

View File

@ -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
)

View File

@ -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?
)

View File

@ -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,