라이브 리스트 - apple-test, google-test 계정은 isAdult가 true인 방이 항상 보이지 않도록 수정
This commit is contained in:
@@ -89,11 +89,13 @@ class LiveRoomQueryRepositoryImpl(
|
|||||||
.and(liveRoom.isActive.isTrue)
|
.and(liveRoom.isActive.isTrue)
|
||||||
.and(liveRoom.member.isNotNull)
|
.and(liveRoom.member.isNotNull)
|
||||||
|
|
||||||
if (!isAdult) {
|
val isAdultRestricted = !isAdult || memberId == 17L || memberId == 16L
|
||||||
|
if (isAdultRestricted) {
|
||||||
where = where.and(liveRoom.isAdult.isFalse)
|
where = where.and(liveRoom.isAdult.isFalse)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCreator && memberId != null) {
|
val hasMemberId = memberId != null
|
||||||
|
if (isCreator && hasMemberId) {
|
||||||
where = where.and(
|
where = where.and(
|
||||||
liveRoom.isAvailableJoinCreator.isTrue
|
liveRoom.isAvailableJoinCreator.isTrue
|
||||||
.or(liveRoom.member.id.eq(memberId))
|
.or(liveRoom.member.id.eq(memberId))
|
||||||
@@ -106,7 +108,7 @@ class LiveRoomQueryRepositoryImpl(
|
|||||||
Gender.FEMALE -> liveRoom.genderRestriction.`in`(GenderRestriction.ALL, GenderRestriction.FEMALE_ONLY)
|
Gender.FEMALE -> liveRoom.genderRestriction.`in`(GenderRestriction.ALL, GenderRestriction.FEMALE_ONLY)
|
||||||
Gender.NONE -> liveRoom.genderRestriction.isNotNull
|
Gender.NONE -> liveRoom.genderRestriction.isNotNull
|
||||||
}
|
}
|
||||||
where = if (memberId != null) {
|
where = if (hasMemberId) {
|
||||||
where.and(genderCondition.or(liveRoom.member.id.eq(memberId)))
|
where.and(genderCondition.or(liveRoom.member.id.eq(memberId)))
|
||||||
} else {
|
} else {
|
||||||
where.and(genderCondition)
|
where.and(genderCondition)
|
||||||
@@ -118,7 +120,7 @@ class LiveRoomQueryRepositoryImpl(
|
|||||||
.innerJoin(liveRoom.member, member)
|
.innerJoin(liveRoom.member, member)
|
||||||
.leftJoin(quarterLiveRankings).on(liveRoom.id.eq(quarterLiveRankings.roomId))
|
.leftJoin(quarterLiveRankings).on(liveRoom.id.eq(quarterLiveRankings.roomId))
|
||||||
|
|
||||||
if (memberId != null) {
|
if (hasMemberId) {
|
||||||
val blockMemberCondition = blockMember.member.id.eq(member.id)
|
val blockMemberCondition = blockMember.member.id.eq(member.id)
|
||||||
.and(blockMember.blockedMember.id.eq(memberId))
|
.and(blockMember.blockedMember.id.eq(memberId))
|
||||||
.and(blockMember.isActive.isTrue)
|
.and(blockMember.isActive.isTrue)
|
||||||
@@ -158,7 +160,8 @@ class LiveRoomQueryRepositoryImpl(
|
|||||||
.and(liveRoom.isActive.isTrue)
|
.and(liveRoom.isActive.isTrue)
|
||||||
.and(liveRoom.member.isNotNull)
|
.and(liveRoom.member.isNotNull)
|
||||||
|
|
||||||
if (!isAdult) {
|
val isAdultRestricted = !isAdult || memberId == 17L || memberId == 16L
|
||||||
|
if (isAdultRestricted) {
|
||||||
where = where.and(liveRoom.isAdult.isFalse)
|
where = where.and(liveRoom.isAdult.isFalse)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,7 +226,8 @@ class LiveRoomQueryRepositoryImpl(
|
|||||||
.and(liveRoom.isActive.isTrue)
|
.and(liveRoom.isActive.isTrue)
|
||||||
.and(liveRoom.member.isNotNull)
|
.and(liveRoom.member.isNotNull)
|
||||||
|
|
||||||
if (!isAdult) {
|
val isAdultRestricted = !isAdult || memberId == 17L || memberId == 16L
|
||||||
|
if (isAdultRestricted) {
|
||||||
where = where.and(liveRoom.isAdult.isFalse)
|
where = where.and(liveRoom.isAdult.isFalse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user