라이브 탭 상단 추천라이브 - 차단 당한 유저는 차단한 유저의 배너가 조회되지 않도록 수정
This commit is contained in:
parent
41fe37bdb2
commit
eece72bc40
|
@ -19,7 +19,11 @@ class LiveRecommendRepository(
|
||||||
@Value("\${cloud.aws.cloud-front.host}")
|
@Value("\${cloud.aws.cloud-front.host}")
|
||||||
private val cloudFrontHost: String
|
private val cloudFrontHost: String
|
||||||
) {
|
) {
|
||||||
fun getRecommendLive(memberId: Long, isAdult: Boolean): List<GetRecommendLiveResponse> {
|
fun getRecommendLive(
|
||||||
|
memberId: Long,
|
||||||
|
isBlocked: (Long) -> Boolean,
|
||||||
|
isAdult: Boolean
|
||||||
|
): List<GetRecommendLiveResponse> {
|
||||||
val dateNow = LocalDateTime.now()
|
val dateNow = LocalDateTime.now()
|
||||||
|
|
||||||
var where = recommendLiveCreatorBanner.startDate.loe(dateNow)
|
var where = recommendLiveCreatorBanner.startDate.loe(dateNow)
|
||||||
|
@ -41,6 +45,9 @@ class LiveRecommendRepository(
|
||||||
.where(where)
|
.where(where)
|
||||||
.orderBy(recommendLiveCreatorBanner.orders.asc())
|
.orderBy(recommendLiveCreatorBanner.orders.asc())
|
||||||
.fetch()
|
.fetch()
|
||||||
|
.asSequence()
|
||||||
|
.filter { !isBlocked(it.creatorId) }
|
||||||
|
.toList()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getOnAirRecommendChannelList(
|
fun getOnAirRecommendChannelList(
|
||||||
|
|
|
@ -14,6 +14,7 @@ class LiveRecommendService(
|
||||||
fun getRecommendLive(member: Member): List<GetRecommendLiveResponse> {
|
fun getRecommendLive(member: Member): List<GetRecommendLiveResponse> {
|
||||||
return repository.getRecommendLive(
|
return repository.getRecommendLive(
|
||||||
memberId = member.id!!,
|
memberId = member.id!!,
|
||||||
|
isBlocked = { !blockMemberRepository.isBlocked(blockedMemberId = member.id!!, memberId = it) },
|
||||||
isAdult = member.auth != null
|
isAdult = member.auth != null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue