커뮤니티 게시글 유료화 #182

Merged
klaus merged 7 commits from test into main 2024-05-24 14:44:15 +00:00
1 changed files with 18 additions and 6 deletions
Showing only changes of commit 37853bdedd - Show all commits

View File

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