feat(creatorname): 레거시 조회와 검색에 언어별 이름을 적용한다
This commit is contained in:
@@ -40,6 +40,7 @@ import kr.co.vividnext.sodalive.member.MemberRepository
|
||||
import kr.co.vividnext.sodalive.member.block.BlockMemberRepository
|
||||
import kr.co.vividnext.sodalive.member.contentpreference.MemberContentPreferenceService
|
||||
import kr.co.vividnext.sodalive.utils.generateFileName
|
||||
import kr.co.vividnext.sodalive.v2.creatorname.application.CreatorLocalizedNameService
|
||||
import kr.co.vividnext.sodalive.v2.home.following.application.HomeFollowingNewsPublishService
|
||||
import kr.co.vividnext.sodalive.v2.recommendation.application.CreatorContentViewHistoryService
|
||||
import org.slf4j.LoggerFactory
|
||||
@@ -87,6 +88,7 @@ class AudioContentService(
|
||||
|
||||
private val messageSource: SodaMessageSource,
|
||||
private val langContext: LangContext,
|
||||
private val localizedNameService: CreatorLocalizedNameService,
|
||||
|
||||
private val contentThemeTranslationRepository: ContentThemeTranslationRepository,
|
||||
private val homeFollowingNewsPublishService: HomeFollowingNewsPublishService,
|
||||
@@ -512,6 +514,7 @@ class AudioContentService(
|
||||
type = FcmEventType.UPLOAD_CONTENT,
|
||||
category = PushNotificationCategory.CONTENT,
|
||||
title = audioContent.member!!.nickname,
|
||||
titleMemberId = audioContent.member!!.id,
|
||||
messageKey = "content.notification.uploaded_message",
|
||||
senderMemberId = audioContent.member!!.id,
|
||||
args = listOf(audioContent.title),
|
||||
@@ -542,6 +545,7 @@ class AudioContentService(
|
||||
type = FcmEventType.UPLOAD_CONTENT,
|
||||
category = PushNotificationCategory.CONTENT,
|
||||
title = audioContent.member!!.nickname,
|
||||
titleMemberId = audioContent.member!!.id,
|
||||
messageKey = "content.notification.uploaded_message",
|
||||
senderMemberId = audioContent.member!!.id,
|
||||
args = listOf(audioContent.title),
|
||||
@@ -702,7 +706,8 @@ class AudioContentService(
|
||||
isContentCreator = creatorId == member.id!!,
|
||||
timezone = timezone,
|
||||
offset = 0,
|
||||
limit = 1
|
||||
limit = 1,
|
||||
lang = langContext.lang
|
||||
)
|
||||
} else {
|
||||
listOf()
|
||||
@@ -844,7 +849,7 @@ class AudioContentService(
|
||||
audioContent.limited != null &&
|
||||
audioContent.remaining != null
|
||||
) {
|
||||
orderRepository.findBuyerListByContentId(id)
|
||||
orderRepository.findBuyerListByContentId(id, langContext.lang)
|
||||
} else {
|
||||
listOf()
|
||||
}
|
||||
@@ -920,6 +925,10 @@ class AudioContentService(
|
||||
)
|
||||
}
|
||||
|
||||
val names = localizedNameService.findLocalizedNames(
|
||||
listOf(creatorId),
|
||||
langContext.lang
|
||||
)
|
||||
return GetAudioContentDetailResponse(
|
||||
contentId = audioContent.id!!,
|
||||
title = audioContent.title,
|
||||
@@ -955,7 +964,7 @@ class AudioContentService(
|
||||
isAvailablePin = isAvailablePin,
|
||||
creator = AudioContentCreator(
|
||||
creatorId = creatorId,
|
||||
nickname = creator.nickname,
|
||||
nickname = names[creatorId] ?: creator.nickname,
|
||||
profileImageUrl = if (creator.profileImage != null) {
|
||||
"$coverImageHost/${creator.profileImage}"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user