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 9ebd070..44a3ed6 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 @@ -189,6 +189,7 @@ class CreatorCommunityService( imageHost = imageHost, date = getTimeAgoString(it.date), isLike = isLike, + memberId = memberId, existOrdered = if (memberId == it.creatorId) { true } else { @@ -244,6 +245,7 @@ class CreatorCommunityService( imageHost = imageHost, date = getTimeAgoString(post.date), isLike = isLike, + memberId = memberId, existOrdered = if (memberId == post.creatorId) { true } else { @@ -413,6 +415,7 @@ class CreatorCommunityService( imageHost = imageHost, date = getTimeAgoString(it.date), isLike = isLike, + memberId = memberId, existOrdered = if (memberId == it.creatorId) { true } else { 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 54a00b4..423fc4e 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 @@ -19,6 +19,7 @@ data class SelectCommunityPostResponse @QueryProjection constructor( imageHost: String, date: String, isLike: Boolean, + memberId: Long, existOrdered: Boolean, likeCount: Int, commentCount: Int, @@ -34,7 +35,15 @@ data class SelectCommunityPostResponse @QueryProjection constructor( } else { null }, - content = content, + content = if (price > 0 && memberId != creatorId) { + if (existOrdered) { + content + } else { + content.substring(0, 15).plus("...") + } + } else { + content + }, price = price, date = date, isCommentAvailable = isCommentAvailable,