test #385

Merged
klaus merged 4 commits from test into main 2026-02-06 05:04:37 +00:00
Showing only changes of commit d90a872e79 - Show all commits

View File

@@ -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)
} }