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( val contentRankCreatorList = rankingService.fetchCreatorBySellContentCountRankTop20(
memberId = member.id!!, memberId = member.id!!,
isAdult = isAdult,
contentType = contentType, contentType = contentType,
startDate = startDate.minusDays(1), startDate = startDate.minusDays(1),
endDate = endDate endDate = endDate

View File

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

View File

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