parent
7c1c4b907b
commit
69331edabb
|
@ -75,7 +75,6 @@ class AdminAudioContentQueryRepositoryImpl(
|
|||
audioContent.id,
|
||||
audioContent.title,
|
||||
audioContent.detail,
|
||||
Expressions.stringTemplate("GROUP_CONCAT({0})", hashTag.tag),
|
||||
audioContentCuration.title,
|
||||
audioContentCuration.id.nullif(0),
|
||||
audioContent.coverImage.prepend("/").prepend(imageHost),
|
||||
|
@ -93,11 +92,8 @@ class AdminAudioContentQueryRepositoryImpl(
|
|||
)
|
||||
.from(audioContent)
|
||||
.leftJoin(audioContent.curation, audioContentCuration)
|
||||
.leftJoin(audioContent.audioContentHashTags, audioContentHashTag)
|
||||
.leftJoin(audioContentHashTag.hashTag, hashTag)
|
||||
.innerJoin(audioContent.theme, audioContentTheme)
|
||||
.where(where)
|
||||
.groupBy(audioContent.id)
|
||||
.offset(offset)
|
||||
.limit(limit)
|
||||
.orderBy(audioContent.releaseDate.desc())
|
||||
|
|
|
@ -30,6 +30,13 @@ class AdminContentService(
|
|||
|
||||
val audioContentList = audioContentAndThemeList
|
||||
.asSequence()
|
||||
.map {
|
||||
val tags = repository
|
||||
.getHashTagList(audioContentId = it.audioContentId)
|
||||
.joinToString(" ") { tag -> tag }
|
||||
it.tags = tags
|
||||
it
|
||||
}
|
||||
.map {
|
||||
it.contentUrl = audioContentCloudFront.generateSignedURL(
|
||||
resourcePath = it.contentUrl,
|
||||
|
@ -54,6 +61,13 @@ class AdminContentService(
|
|||
|
||||
val audioContentList = audioContentAndThemeList
|
||||
.asSequence()
|
||||
.map {
|
||||
val tags = repository
|
||||
.getHashTagList(audioContentId = it.audioContentId)
|
||||
.joinToString(" ") { tag -> tag }
|
||||
it.tags = tags
|
||||
it
|
||||
}
|
||||
.map {
|
||||
it.contentUrl = audioContentCloudFront.generateSignedURL(
|
||||
resourcePath = it.contentUrl,
|
||||
|
|
|
@ -11,7 +11,6 @@ data class GetAdminContentListItem @QueryProjection constructor(
|
|||
val audioContentId: Long,
|
||||
val title: String,
|
||||
val detail: String,
|
||||
var tags: String,
|
||||
val curationTitle: String?,
|
||||
val curationId: Long,
|
||||
var coverImageUrl: String,
|
||||
|
@ -25,4 +24,6 @@ data class GetAdminContentListItem @QueryProjection constructor(
|
|||
val isCommentAvailable: Boolean,
|
||||
val date: String,
|
||||
val releaseDate: String?
|
||||
)
|
||||
) {
|
||||
var tags: String = ""
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue