예약 업로드 된 오디오 콘텐츠 릴리즈

This commit is contained in:
Klaus 2024-01-10 23:40:17 +09:00
parent c479e5ad81
commit f89a61e23e
2 changed files with 4 additions and 3 deletions

View File

@ -199,8 +199,9 @@ class AudioContentController(
fun releaseContent() = run {
val contentIdList = repository.getNotReleaseContentId()
contentIdList.forEach {
service.releaseContent(it)
for (contentId in contentIdList) {
println(contentId)
service.releaseContent(contentId)
}
ApiResponse.ok(null)

View File

@ -593,7 +593,7 @@ class AudioContentQueryRepositoryImpl(private val queryFactory: JPAQueryFactory)
override fun getNotReleaseContentId(): List<Long> {
val where = audioContent.isActive.isFalse
.and(audioContent.releaseDate.isNotNull)
.and(audioContent.releaseDate.loe(LocalDateTime.now()))
.and(audioContent.releaseDate.goe(LocalDateTime.now()))
return queryFactory
.select(audioContent.id)