크리에이터 채널 - 콘텐츠 수, 라이브 리스트 나오도록 수정
This commit is contained in:
parent
248e57b08c
commit
dde4eb4a98
|
@ -7,6 +7,7 @@ import com.querydsl.jpa.impl.JPAQueryFactory
|
||||||
import kr.co.vividnext.sodalive.can.use.CanUsage
|
import kr.co.vividnext.sodalive.can.use.CanUsage
|
||||||
import kr.co.vividnext.sodalive.can.use.QUseCan.useCan
|
import kr.co.vividnext.sodalive.can.use.QUseCan.useCan
|
||||||
import kr.co.vividnext.sodalive.common.SodaException
|
import kr.co.vividnext.sodalive.common.SodaException
|
||||||
|
import kr.co.vividnext.sodalive.content.QAudioContent.audioContent
|
||||||
import kr.co.vividnext.sodalive.explorer.follower.GetFollowerListDto
|
import kr.co.vividnext.sodalive.explorer.follower.GetFollowerListDto
|
||||||
import kr.co.vividnext.sodalive.explorer.follower.QGetFollowerListDto
|
import kr.co.vividnext.sodalive.explorer.follower.QGetFollowerListDto
|
||||||
import kr.co.vividnext.sodalive.explorer.profile.ChannelNotice
|
import kr.co.vividnext.sodalive.explorer.profile.ChannelNotice
|
||||||
|
@ -364,6 +365,7 @@ class ExplorerQueryRepository(
|
||||||
val isPaid = if (it.channelName != null) {
|
val isPaid = if (it.channelName != null) {
|
||||||
val useCan = queryFactory
|
val useCan = queryFactory
|
||||||
.selectFrom(useCan)
|
.selectFrom(useCan)
|
||||||
|
.innerJoin(useCan.member, member)
|
||||||
.where(
|
.where(
|
||||||
useCan.member.id.eq(member.id)
|
useCan.member.id.eq(member.id)
|
||||||
.and(useCan.room.id.eq(it.id!!))
|
.and(useCan.room.id.eq(it.id!!))
|
||||||
|
@ -597,4 +599,15 @@ class ExplorerQueryRepository(
|
||||||
.where(channelNotice.member.id.eq(creatorId))
|
.where(channelNotice.member.id.eq(creatorId))
|
||||||
.fetchFirst()
|
.fetchFirst()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getContentCount(creatorId: Long): Long? {
|
||||||
|
return queryFactory
|
||||||
|
.select(audioContent.id.count())
|
||||||
|
.from(audioContent)
|
||||||
|
.where(
|
||||||
|
audioContent.isActive.isTrue
|
||||||
|
.and(audioContent.member.id.eq(creatorId))
|
||||||
|
)
|
||||||
|
.fetchFirst()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,7 +198,7 @@ class ExplorerService(
|
||||||
val liveCount = queryRepository.getLiveCount(creatorId) ?: 0
|
val liveCount = queryRepository.getLiveCount(creatorId) ?: 0
|
||||||
val liveTime = queryRepository.getLiveTime(creatorId)
|
val liveTime = queryRepository.getLiveTime(creatorId)
|
||||||
val liveContributorCount = queryRepository.getLiveContributorCount(creatorId) ?: 0
|
val liveContributorCount = queryRepository.getLiveContributorCount(creatorId) ?: 0
|
||||||
val contentCount = 0L
|
val contentCount = queryRepository.getContentCount(creatorId) ?: 0
|
||||||
|
|
||||||
return GetCreatorProfileResponse(
|
return GetCreatorProfileResponse(
|
||||||
creator = CreatorResponse(
|
creator = CreatorResponse(
|
||||||
|
|
Loading…
Reference in New Issue