채널 후원랭킹 보기 스위칭 API 추가

This commit is contained in:
2023-10-05 19:32:56 +09:00
parent 51260311a0
commit ed4f0a62a1
6 changed files with 21 additions and 0 deletions

View File

@@ -628,4 +628,12 @@ class ExplorerQueryRepository(
)
.fetchFirst()
}
fun getVisibleDonationRank(creatorId: Long): Boolean {
return queryFactory
.select(member.isVisibleDonationRank)
.from(member)
.where(member.id.eq(creatorId))
.fetchFirst()
}
}

View File

@@ -290,6 +290,11 @@ class ExplorerService(
} else {
0
},
isVisibleDonationRank = if (creatorId == member.id!!) {
queryRepository.getVisibleDonationRank(creatorId)
} else {
false
},
totalCount = queryRepository.getMemberDonationRankingTotal(creatorId),
userDonationRanking = queryRepository.getMemberDonationRanking(
creatorId,

View File

@@ -4,6 +4,7 @@ data class GetDonationAllResponse(
val accumulatedCansToday: Int,
val accumulatedCansLastWeek: Int,
val accumulatedCansThisMonth: Int,
val isVisibleDonationRank: Boolean,
val totalCount: Int,
val userDonationRanking: List<MemberDonationRankingResponse>
)