Compare commits
No commits in common. "60ce64d3e1e7f44788834cd0680f994f9ac65d81" and "a8589ef4e733e570d2e75f2d5ad632758688a252" have entirely different histories.
60ce64d3e1
...
a8589ef4e7
|
@ -7,7 +7,6 @@ import org.springframework.data.domain.Pageable
|
||||||
import org.springframework.security.core.annotation.AuthenticationPrincipal
|
import org.springframework.security.core.annotation.AuthenticationPrincipal
|
||||||
import org.springframework.web.bind.annotation.GetMapping
|
import org.springframework.web.bind.annotation.GetMapping
|
||||||
import org.springframework.web.bind.annotation.RequestMapping
|
import org.springframework.web.bind.annotation.RequestMapping
|
||||||
import org.springframework.web.bind.annotation.RequestParam
|
|
||||||
import org.springframework.web.bind.annotation.RestController
|
import org.springframework.web.bind.annotation.RestController
|
||||||
|
|
||||||
@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
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,16 +200,4 @@ class AudioContentMainTabSeriesService(
|
||||||
|
|
||||||
return GetSeriesListResponse(totalCount, items)
|
return GetSeriesListResponse(totalCount, items)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getRecommendSeriesListByGenre(
|
|
||||||
genreId: Long,
|
|
||||||
memberId: Long,
|
|
||||||
isAdult: Boolean
|
|
||||||
): List<GetSeriesListResponse.SeriesListItem> {
|
|
||||||
return rankingService.getSeriesAllRankingByGenre(
|
|
||||||
memberId = memberId,
|
|
||||||
isAdult = isAdult,
|
|
||||||
genreId = genreId
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ class ContentSeriesQueryRepositoryImpl(
|
||||||
.innerJoin(series.member, member)
|
.innerJoin(series.member, member)
|
||||||
.leftJoin(blockMember).on(blockMemberCondition)
|
.leftJoin(blockMember).on(blockMemberCondition)
|
||||||
.where(where)
|
.where(where)
|
||||||
.orderBy(series.id.desc())
|
.orderBy(Expressions.numberTemplate(Double::class.java, "function('rand')").asc())
|
||||||
.offset(offset)
|
.offset(offset)
|
||||||
.limit(limit)
|
.limit(limit)
|
||||||
.fetch()
|
.fetch()
|
||||||
|
|
Loading…
Reference in New Issue