From fc3b62ee3731f6cc54fa48c54cbeafbb5e7d719e Mon Sep 17 00:00:00 2001 From: Klaus Date: Tue, 11 Jun 2024 20:45:00 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BB=A4=EB=AE=A4=EB=8B=88=ED=8B=B0=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EB=AC=BC=20-=20=EA=B5=AC=EB=A7=A4=ED=95=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EC=9D=80=20=EC=9C=A0=EB=A3=8C=EA=B2=8C?= =?UTF-8?q?=EC=8B=9C=EB=AC=BC=EC=9D=80=2015=EA=B8=80=EC=9E=90=EA=B9=8C?= =?UTF-8?q?=EC=A7=80=EB=A7=8C=20=EB=B3=B4=EC=9D=B4=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creatorCommunity/CreatorCommunityService.kt | 3 +++ .../creatorCommunity/SelectCommunityPostResponse.kt | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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,