Compare commits
No commits in common. "51fd5408dcf63ed83eca25813eab87ce36388623" and "3fae40fbefc92dad700ff1aad83d016f40eb1518" have entirely different histories.
51fd5408dc
...
3fae40fbef
|
@ -628,12 +628,4 @@ class ExplorerQueryRepository(
|
||||||
)
|
)
|
||||||
.fetchFirst()
|
.fetchFirst()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getVisibleDonationRank(creatorId: Long): Boolean {
|
|
||||||
return queryFactory
|
|
||||||
.select(member.isVisibleDonationRank)
|
|
||||||
.from(member)
|
|
||||||
.where(member.id.eq(creatorId))
|
|
||||||
.fetchFirst()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,15 +178,11 @@ class ExplorerService(
|
||||||
val notificationRecipientCount = notificationUserIds.size
|
val notificationRecipientCount = notificationUserIds.size
|
||||||
|
|
||||||
// 후원랭킹
|
// 후원랭킹
|
||||||
val memberDonationRanking = if (creatorId == member.id!! || creatorAccount.isVisibleDonationRank) {
|
val memberDonationRanking = queryRepository.getMemberDonationRanking(
|
||||||
queryRepository.getMemberDonationRanking(
|
creatorId,
|
||||||
creatorId,
|
10,
|
||||||
10,
|
withDonationCan = creatorId == member.id!!
|
||||||
withDonationCan = creatorId == member.id!!
|
)
|
||||||
)
|
|
||||||
} else {
|
|
||||||
listOf()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 추천 크리에이터
|
// 추천 크리에이터
|
||||||
val similarCreatorList = queryRepository.getSimilarCreatorList(creatorId)
|
val similarCreatorList = queryRepository.getSimilarCreatorList(creatorId)
|
||||||
|
@ -294,11 +290,6 @@ class ExplorerService(
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
},
|
},
|
||||||
isVisibleDonationRank = if (creatorId == member.id!!) {
|
|
||||||
queryRepository.getVisibleDonationRank(creatorId)
|
|
||||||
} else {
|
|
||||||
false
|
|
||||||
},
|
|
||||||
totalCount = queryRepository.getMemberDonationRankingTotal(creatorId),
|
totalCount = queryRepository.getMemberDonationRankingTotal(creatorId),
|
||||||
userDonationRanking = queryRepository.getMemberDonationRanking(
|
userDonationRanking = queryRepository.getMemberDonationRanking(
|
||||||
creatorId,
|
creatorId,
|
||||||
|
|
|
@ -4,7 +4,6 @@ data class GetDonationAllResponse(
|
||||||
val accumulatedCansToday: Int,
|
val accumulatedCansToday: Int,
|
||||||
val accumulatedCansLastWeek: Int,
|
val accumulatedCansLastWeek: Int,
|
||||||
val accumulatedCansThisMonth: Int,
|
val accumulatedCansThisMonth: Int,
|
||||||
val isVisibleDonationRank: Boolean,
|
|
||||||
val totalCount: Int,
|
val totalCount: Int,
|
||||||
val userDonationRanking: List<MemberDonationRankingResponse>
|
val userDonationRanking: List<MemberDonationRankingResponse>
|
||||||
)
|
)
|
||||||
|
|
|
@ -653,19 +653,15 @@ class LiveRoomService(
|
||||||
.getNotificationUserIds(room.member!!.id!!)
|
.getNotificationUserIds(room.member!!.id!!)
|
||||||
.contains(member.id)
|
.contains(member.id)
|
||||||
|
|
||||||
val donationRankingTop3UserIds = if (room.member!!.isVisibleDonationRank) {
|
val donationRankingTop3UserIds = explorerQueryRepository
|
||||||
explorerQueryRepository
|
.getMemberDonationRanking(
|
||||||
.getMemberDonationRanking(
|
room.member!!.id!!,
|
||||||
room.member!!.id!!,
|
3,
|
||||||
3,
|
withDonationCan = false
|
||||||
withDonationCan = false
|
)
|
||||||
)
|
.asSequence()
|
||||||
.asSequence()
|
.map { it.userId }
|
||||||
.map { it.userId }
|
.toList()
|
||||||
.toList()
|
|
||||||
} else {
|
|
||||||
listOf()
|
|
||||||
}
|
|
||||||
|
|
||||||
return GetRoomInfoResponse(
|
return GetRoomInfoResponse(
|
||||||
roomId = roomId,
|
roomId = roomId,
|
||||||
|
|
|
@ -28,8 +28,6 @@ data class Member(
|
||||||
@Enumerated(value = EnumType.STRING)
|
@Enumerated(value = EnumType.STRING)
|
||||||
var role: MemberRole = MemberRole.USER,
|
var role: MemberRole = MemberRole.USER,
|
||||||
|
|
||||||
var isVisibleDonationRank: Boolean = true,
|
|
||||||
|
|
||||||
var isActive: Boolean = true,
|
var isActive: Boolean = true,
|
||||||
|
|
||||||
var container: String = "web"
|
var container: String = "web"
|
||||||
|
|
|
@ -547,10 +547,6 @@ class MemberService(
|
||||||
member.blogUrl = profileUpdateRequest.blogUrl
|
member.blogUrl = profileUpdateRequest.blogUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
if (profileUpdateRequest.isVisibleDonationRank != null) {
|
|
||||||
member.isVisibleDonationRank = profileUpdateRequest.isVisibleDonationRank
|
|
||||||
}
|
|
||||||
|
|
||||||
return ProfileResponse(member, cloudFrontHost, profileUpdateRequest.container)
|
return ProfileResponse(member, cloudFrontHost, profileUpdateRequest.container)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,5 @@ data class ProfileUpdateRequest(
|
||||||
val instagramUrl: String? = null,
|
val instagramUrl: String? = null,
|
||||||
val websiteUrl: String? = null,
|
val websiteUrl: String? = null,
|
||||||
val blogUrl: String? = null,
|
val blogUrl: String? = null,
|
||||||
val isVisibleDonationRank: Boolean? = null,
|
|
||||||
val container: String
|
val container: String
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue