From e013cdb39d8ccdf78f1bff02e828bcfb21de7744 Mon Sep 17 00:00:00 2001 From: Klaus Date: Wed, 8 Jul 2026 01:26:31 +0900 Subject: [PATCH] =?UTF-8?q?feat(community):=20=EB=8C=93=EA=B8=80=20?= =?UTF-8?q?=EB=B9=84=EB=B0=80=20=EC=97=AC=EB=B6=80=EB=A5=BC=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DefaultCreatorChannelCommunityQueryRepository.kt | 2 ++ .../application/CreatorChannelCommunityQueryService.kt | 1 + .../community/domain/CreatorChannelCommunityPostDetail.kt | 1 + .../community/port/out/CreatorChannelCommunityQueryPort.kt | 1 + .../application/CreatorChannelCommunityQueryServiceTest.kt | 6 +++++- 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/adapter/out/persistence/DefaultCreatorChannelCommunityQueryRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/adapter/out/persistence/DefaultCreatorChannelCommunityQueryRepository.kt index 126c5695..9ee6efd3 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/adapter/out/persistence/DefaultCreatorChannelCommunityQueryRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/adapter/out/persistence/DefaultCreatorChannelCommunityQueryRepository.kt @@ -260,6 +260,7 @@ class DefaultCreatorChannelCommunityQueryRepository( creatorCommunityComment.member.profileImage, creatorCommunityComment.member.nickname, creatorCommunityComment.comment, + creatorCommunityComment.isSecret, creatorCommunityComment.createdAt ) @@ -556,6 +557,7 @@ class DefaultCreatorChannelCommunityQueryRepository( writerProfilePath = get(creatorCommunityComment.member.profileImage), writerNickname = get(creatorCommunityComment.member.nickname)!!, content = get(creatorCommunityComment.comment)!!, + isSecret = get(creatorCommunityComment.isSecret)!!, createdAt = get(creatorCommunityComment.createdAt)!! ) } diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryService.kt index ed2dce0e..1c3f3c5f 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryService.kt @@ -257,6 +257,7 @@ class CreatorChannelCommunityQueryService( writerProfileImageUrl = writerProfilePath.toCdnUrl(cloudFrontHost) ?: defaultProfileImageUrl(), writerNickname = writerNickname.removeDeletedNicknamePrefix(), content = content, + isSecret = isSecret, createdAt = createdAt, latestReply = latestReply ) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/domain/CreatorChannelCommunityPostDetail.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/domain/CreatorChannelCommunityPostDetail.kt index e3e250e8..ac46b00d 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/domain/CreatorChannelCommunityPostDetail.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/domain/CreatorChannelCommunityPostDetail.kt @@ -21,6 +21,7 @@ data class CreatorChannelCommunityComment( val writerProfileImageUrl: String, val writerNickname: String, val content: String, + val isSecret: Boolean, val createdAt: LocalDateTime, val latestReply: CreatorChannelCommunityReply? ) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/port/out/CreatorChannelCommunityQueryPort.kt b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/port/out/CreatorChannelCommunityQueryPort.kt index 16536dba..d5cdd98c 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/port/out/CreatorChannelCommunityQueryPort.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/port/out/CreatorChannelCommunityQueryPort.kt @@ -106,6 +106,7 @@ data class CreatorChannelCommunityCommentRecord( val writerProfilePath: String?, val writerNickname: String, val content: String, + val isSecret: Boolean, val createdAt: LocalDateTime ) diff --git a/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryServiceTest.kt b/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryServiceTest.kt index 4f4d816e..6fd723c6 100644 --- a/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryServiceTest.kt +++ b/src/test/kotlin/kr/co/vividnext/sodalive/v2/creator/channel/community/application/CreatorChannelCommunityQueryServiceTest.kt @@ -195,6 +195,7 @@ class CreatorChannelCommunityQueryServiceTest { assertEquals(20, detail.comments.comments.size) assertEquals(true, detail.comments.hasNext) assertEquals(101L, detail.comments.comments.first().writerId) + assertEquals(false, detail.comments.comments.first().isSecret) assertEquals("reply-writer", detail.comments.comments.first().latestReply?.writerNickname) assertEquals(200L, detail.comments.comments.first().latestReply?.writerId) assertEquals("https://cdn.test/profile/default-profile.png", detail.comments.comments.first().writerProfileImageUrl) @@ -237,6 +238,7 @@ class CreatorChannelCommunityQueryServiceTest { assertEquals(50, comments.comments.size) assertEquals(true, comments.hasNext) assertEquals(101L, comments.comments.first().writerId) + assertEquals(false, comments.comments.first().isSecret) assertEquals("https://cdn.test/profile/1.png", comments.comments.first().writerProfileImageUrl) assertEquals(100L, comments.comments[1].latestReply?.commentId) assertEquals(200L, comments.comments[1].latestReply?.writerId) @@ -499,7 +501,8 @@ private fun communityCommentRecord( commentId: Long, parentCommentId: Long? = null, writerProfilePath: String? = null, - writerNickname: String = "writer-$commentId" + writerNickname: String = "writer-$commentId", + isSecret: Boolean = false ): CreatorChannelCommunityCommentRecord { return CreatorChannelCommunityCommentRecord( commentId = commentId, @@ -509,6 +512,7 @@ private fun communityCommentRecord( writerProfilePath = writerProfilePath, writerNickname = writerNickname, content = "comment-$commentId", + isSecret = isSecret, createdAt = LocalDateTime.of(2026, 7, 6, 10, 0).plusMinutes(commentId) ) }