test #290

Merged
klaus merged 6 commits from test into main 2025-03-19 07:51:26 +00:00
3 changed files with 19 additions and 12 deletions
Showing only changes of commit e488f3419e - Show all commits

View File

@ -83,6 +83,7 @@ class AudioContentMainTabHomeService(
val contentRankCreatorList = rankingService.fetchCreatorBySellContentCountRankTop20(
memberId = member.id!!,
isAdult = isAdult,
contentType = contentType,
startDate = startDate.minusDays(1),
endDate = endDate

View File

@ -409,6 +409,7 @@ class RankingRepository(
fun fetchCreatorBySellContentCountRankTop20(
memberId: Long,
isAdult: Boolean,
contentType: ContentType,
startDate: LocalDateTime,
endDate: LocalDateTime
@ -422,7 +423,7 @@ class RankingRepository(
.and(order.createdAt.goe(startDate))
.and(order.createdAt.lt(endDate))
var memberCondition = member.isActive.isTrue
val memberCondition = member.isActive.isTrue
.and(member.role.eq(MemberRole.CREATOR))
.and(member.id.eq(audioContent.member.id))
@ -432,18 +433,22 @@ class RankingRepository(
.and(audioContent.limited.isNull)
.and(blockMember.id.isNull)
if (contentType != ContentType.ALL) {
where = where.and(
audioContent.member.auth.isNull.or(
audioContent.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
if (!isAdult) {
where = where.and(audioContent.isAdult.isFalse)
} else {
if (contentType != ContentType.ALL) {
where = where.and(
audioContent.member.auth.isNull.or(
audioContent.member.auth.gender.eq(
if (contentType == ContentType.MALE) {
0
} else {
1
}
)
)
)
)
}
}
return queryFactory

View File

@ -189,11 +189,12 @@ class RankingService(
fun fetchCreatorBySellContentCountRankTop20(
memberId: Long,
isAdult: Boolean,
contentType: ContentType,
startDate: LocalDateTime,
endDate: LocalDateTime
): List<ContentCreatorResponse> {
return repository.fetchCreatorBySellContentCountRankTop20(memberId, contentType, startDate, endDate)
return repository.fetchCreatorBySellContentCountRankTop20(memberId, isAdult, contentType, startDate, endDate)
}
fun fetchCreatorContentBySalesCountTop4(