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