불필요한 코드 제거

This commit is contained in:
Klaus 2024-09-07 01:56:23 +09:00
parent 7f855bfc56
commit 8e5b43a14e
4 changed files with 0 additions and 21 deletions

View File

@ -74,7 +74,6 @@ class AudioContentCommentController(private val service: AudioContentCommentServ
return ApiResponse.ok(
service.getCommentReplyList(
commentId = commentId,
memberId = member.id!!,
timezone = timezone,
pageable = pageable
)

View File

@ -5,7 +5,6 @@ import com.querydsl.jpa.impl.JPAQueryFactory
import kr.co.vividnext.sodalive.content.QAudioContent.audioContent
import kr.co.vividnext.sodalive.content.comment.QAudioContentComment.audioContentComment
import kr.co.vividnext.sodalive.member.QMember.member
import kr.co.vividnext.sodalive.member.block.QBlockMember.blockMember
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.stereotype.Repository
import java.time.LocalDateTime
@ -29,7 +28,6 @@ interface AudioContentCommentQueryRepository {
fun getAudioContentCommentReplyList(
cloudFrontHost: String,
commentId: Long,
memberId: Long,
timezone: String,
offset: Long,
limit: Int
@ -87,7 +85,6 @@ class AudioContentCommentQueryRepositoryImpl(
audioContentComment.member.profileImage.prepend("/").prepend(cloudFrontHost),
audioContentComment.comment,
audioContentComment.isSecret,
blockMember.id.isNotNull,
audioContentComment.donationCan.coalesce(0),
formattedDate,
Expressions.constant(0)
@ -96,12 +93,6 @@ class AudioContentCommentQueryRepositoryImpl(
.from(audioContentComment)
.innerJoin(audioContentComment.audioContent, audioContent)
.innerJoin(audioContentComment.member, member)
.leftJoin(blockMember)
.on(
member.id.eq(blockMember.blockedMember.id)
.and(blockMember.isActive.isTrue)
.and(blockMember.member.id.eq(memberId))
)
.where(where)
.offset(offset)
.limit(limit.toLong())
@ -150,7 +141,6 @@ class AudioContentCommentQueryRepositoryImpl(
override fun getAudioContentCommentReplyList(
cloudFrontHost: String,
commentId: Long,
memberId: Long,
timezone: String,
offset: Long,
limit: Int
@ -176,7 +166,6 @@ class AudioContentCommentQueryRepositoryImpl(
audioContentComment.member.profileImage.prepend("/").prepend(cloudFrontHost),
audioContentComment.comment,
audioContentComment.isSecret,
blockMember.id.isNotNull,
audioContentComment.donationCan.coalesce(0),
formattedDate,
Expressions.constant(0)
@ -184,12 +173,6 @@ class AudioContentCommentQueryRepositoryImpl(
)
.from(audioContentComment)
.innerJoin(audioContentComment.member, member)
.leftJoin(blockMember)
.on(
member.id.eq(blockMember.blockedMember.id)
.and(blockMember.isActive.isTrue)
.and(blockMember.member.id.eq(memberId))
)
.where(
audioContentComment.parent.isNotNull
.and(audioContentComment.parent.id.eq(commentId))

View File

@ -134,14 +134,12 @@ class AudioContentCommentService(
fun getCommentReplyList(
commentId: Long,
memberId: Long,
timezone: String,
pageable: Pageable
): GetAudioContentCommentListResponse {
val commentList = repository.getAudioContentCommentReplyList(
cloudFrontHost = cloudFrontHost,
commentId = commentId,
memberId = memberId,
timezone = timezone,
offset = pageable.offset,
limit = pageable.pageSize

View File

@ -14,7 +14,6 @@ data class GetAudioContentCommentListItem @QueryProjection constructor(
val profileUrl: String,
val comment: String,
val isSecret: Boolean,
val isWriterBlock: Boolean,
val donationCan: Int,
val date: String,
var replyCount: Int = 0