Compare commits

..

No commits in common. "60ce64d3e1e7f44788834cd0680f994f9ac65d81" and "a8589ef4e733e570d2e75f2d5ad632758688a252" have entirely different histories.

3 changed files with 1 additions and 30 deletions

View File

@ -7,7 +7,6 @@ import org.springframework.data.domain.Pageable
import org.springframework.security.core.annotation.AuthenticationPrincipal
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController
@RestController
@ -55,20 +54,4 @@ class AudioContentMainTabSeriesController(private val service: AudioContentMainT
)
)
}
@GetMapping("/recommend-by-genre")
fun getRecommendSeriesListByGenre(
@RequestParam genreId: Long,
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?
) = run {
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
ApiResponse.ok(
service.getRecommendSeriesListByGenre(
genreId,
memberId = member.id!!,
isAdult = member.auth != null
)
)
}
}

View File

@ -200,16 +200,4 @@ class AudioContentMainTabSeriesService(
return GetSeriesListResponse(totalCount, items)
}
fun getRecommendSeriesListByGenre(
genreId: Long,
memberId: Long,
isAdult: Boolean
): List<GetSeriesListResponse.SeriesListItem> {
return rankingService.getSeriesAllRankingByGenre(
memberId = memberId,
isAdult = isAdult,
genreId = genreId
)
}
}

View File

@ -162,7 +162,7 @@ class ContentSeriesQueryRepositoryImpl(
.innerJoin(series.member, member)
.leftJoin(blockMember).on(blockMemberCondition)
.where(where)
.orderBy(series.id.desc())
.orderBy(Expressions.numberTemplate(Double::class.java, "function('rand')").asc())
.offset(offset)
.limit(limit)
.fetch()