Compare commits

..

No commits in common. "dce1abaeff9839c7d2a818d37431c056cf51e87c" and "b7610641e544493e38bc42c7ecc8b801d2642417" have entirely different histories.

6 changed files with 5 additions and 52 deletions

View File

@ -679,8 +679,7 @@ class AudioContentQueryRepositoryImpl(
audioContent.price,
audioContent.duration,
member.id,
member.nickname,
member.profileImage.prepend("/").prepend(imageHost)
member.nickname
)
)

View File

@ -17,6 +17,5 @@ data class GetAudioContentRankingItem @QueryProjection constructor(
@JsonProperty("price") val price: Int,
@JsonProperty("duration") val duration: String,
@JsonProperty("creatorId") val creatorId: Long,
@JsonProperty("creatorNickname") val creatorNickname: String,
@JsonProperty("creatorProfileImageUrl") val creatorProfileImageUrl: String
@JsonProperty("creatorNickname") val creatorNickname: String
)

View File

@ -1,8 +0,0 @@
package kr.co.vividnext.sodalive.content.main.tab
import kr.co.vividnext.sodalive.content.main.GetAudioContentRankingItem
data class GetPopularContentByCreatorResponse(
val salesRankContentList: List<GetAudioContentRankingItem>,
val salesCountRankContentList: List<GetAudioContentRankingItem>
)

View File

@ -6,7 +6,6 @@ import kr.co.vividnext.sodalive.member.Member
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
@ -20,19 +19,4 @@ class AudioContentMainTabHomeController(private val service: AudioContentMainTab
ApiResponse.ok(service.fetchData(member))
}
@GetMapping("/popular-content-by-creator")
fun getPopularContentByCreator(
@RequestParam creatorId: Long,
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?
) = run {
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
ApiResponse.ok(
service.getPopularContentByCreator(
creatorId = creatorId,
isAdult = member.auth != null
)
)
}
}

View File

@ -1,7 +1,6 @@
package kr.co.vividnext.sodalive.content.main.tab.home
import kr.co.vividnext.sodalive.content.main.banner.AudioContentBannerService
import kr.co.vividnext.sodalive.content.main.tab.GetPopularContentByCreatorResponse
import kr.co.vividnext.sodalive.event.EventService
import kr.co.vividnext.sodalive.member.Member
import kr.co.vividnext.sodalive.notice.ServiceNoticeService
@ -115,21 +114,4 @@ class AudioContentMainTabHomeService(
salesCountRankContentList = salesCountRankContentList
)
}
fun getPopularContentByCreator(creatorId: Long, isAdult: Boolean): GetPopularContentByCreatorResponse {
val salesRankContentList = rankingService.fetchCreatorContentBySalesTop2(
creatorId = creatorId,
isAdult = isAdult
)
val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop2(
creatorId = creatorId,
isAdult = isAdult
)
return GetPopularContentByCreatorResponse(
salesRankContentList = salesRankContentList,
salesCountRankContentList = salesCountRankContentList
)
}
}

View File

@ -82,8 +82,7 @@ class RankingRepository(
audioContent.price,
audioContent.duration,
member.id,
member.nickname,
member.profileImage.prepend("/").prepend(imageHost)
member.nickname
)
)
@ -366,8 +365,7 @@ class RankingRepository(
audioContent.price,
audioContent.duration,
member.id,
member.nickname,
member.profileImage.prepend("/").prepend(imageHost)
member.nickname
)
)
.from(order)
@ -406,8 +404,7 @@ class RankingRepository(
audioContent.price,
audioContent.duration,
member.id,
member.nickname,
member.profileImage.prepend("/").prepend(imageHost)
member.nickname
)
)
.from(order)