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