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