From 37853bdedd6d769d22e4b9e9ffa133cf1bc4054f Mon Sep 17 00:00:00 2001 From: Klaus Date: Thu, 23 May 2024 12:49:18 +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=EA=B8=80=20=EC=A1=B0=ED=9A=8C=20-=20?= =?UTF-8?q?=EB=82=B4=EA=B0=80=20=EC=93=B4=20=EA=B2=8C=EC=8B=9C=EA=B8=80?= =?UTF-8?q?=EC=9D=80=20=EB=AC=B4=EC=A1=B0=EA=B1=B4=20=EB=B3=B4=EC=9D=B4?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CreatorCommunityService.kt | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) 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 f1f6633..ec34a95 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 @@ -182,7 +182,7 @@ class CreatorCommunityService( val existOrdered = useCanRepository.isExistOrdered(postId = it.id, memberId = memberId) - val content = if (it.price > 0) { + val content = if (it.price > 0 && memberId != it.creatorId) { if (existOrdered) { it.content } else { @@ -208,7 +208,11 @@ class CreatorCommunityService( isCommentAvailable = it.isCommentAvailable, isAdult = false, isLike = isLike, - existOrdered = existOrdered, + existOrdered = if (memberId == it.creatorId) { + true + } else { + existOrdered + }, likeCount = likeCount, commentCount = commentCount, firstComment = firstComment @@ -256,7 +260,7 @@ class CreatorCommunityService( val existOrdered = useCanRepository.isExistOrdered(postId = post.id!!, memberId = memberId) - val content = if (post.price > 0) { + val content = if (post.price > 0 && memberId != post.member!!.id) { if (existOrdered) { post.content } else { @@ -286,7 +290,11 @@ class CreatorCommunityService( isCommentAvailable = post.isCommentAvailable, isAdult = post.isAdult, isLike = isLike, - existOrdered = existOrdered, + existOrdered = if (memberId == post.member!!.id!!) { + true + } else { + existOrdered + }, likeCount = likeCount, commentCount = commentCount, firstComment = firstComment @@ -448,7 +456,7 @@ class CreatorCommunityService( val existOrdered = useCanRepository.isExistOrdered(postId = it.id, memberId = memberId) - val content = if (it.price > 0) { + val content = if (it.price > 0 && memberId != it.creatorId) { if (existOrdered) { it.content } else { @@ -474,7 +482,11 @@ class CreatorCommunityService( isCommentAvailable = it.isCommentAvailable, isAdult = false, isLike = isLike, - existOrdered = existOrdered, + existOrdered = if (memberId == it.creatorId) { + true + } else { + existOrdered + }, likeCount = likeCount, commentCount = commentCount, firstComment = firstComment