Compare commits
No commits in common. "dce1abaeff9839c7d2a818d37431c056cf51e87c" and "b7610641e544493e38bc42c7ecc8b801d2642417" have entirely different histories.
dce1abaeff
...
b7610641e5
|
@ -679,8 +679,7 @@ class AudioContentQueryRepositoryImpl(
|
||||||
audioContent.price,
|
audioContent.price,
|
||||||
audioContent.duration,
|
audioContent.duration,
|
||||||
member.id,
|
member.id,
|
||||||
member.nickname,
|
member.nickname
|
||||||
member.profileImage.prepend("/").prepend(imageHost)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,5 @@ data class GetAudioContentRankingItem @QueryProjection constructor(
|
||||||
@JsonProperty("price") val price: Int,
|
@JsonProperty("price") val price: Int,
|
||||||
@JsonProperty("duration") val duration: String,
|
@JsonProperty("duration") val duration: String,
|
||||||
@JsonProperty("creatorId") val creatorId: Long,
|
@JsonProperty("creatorId") val creatorId: Long,
|
||||||
@JsonProperty("creatorNickname") val creatorNickname: String,
|
@JsonProperty("creatorNickname") val creatorNickname: String
|
||||||
@JsonProperty("creatorProfileImageUrl") val creatorProfileImageUrl: String
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -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>
|
|
||||||
)
|
|
|
@ -6,7 +6,6 @@ import kr.co.vividnext.sodalive.member.Member
|
||||||
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
|
||||||
|
@ -20,19 +19,4 @@ class AudioContentMainTabHomeController(private val service: AudioContentMainTab
|
||||||
|
|
||||||
ApiResponse.ok(service.fetchData(member))
|
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
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package kr.co.vividnext.sodalive.content.main.tab.home
|
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.banner.AudioContentBannerService
|
||||||
import kr.co.vividnext.sodalive.content.main.tab.GetPopularContentByCreatorResponse
|
|
||||||
import kr.co.vividnext.sodalive.event.EventService
|
import kr.co.vividnext.sodalive.event.EventService
|
||||||
import kr.co.vividnext.sodalive.member.Member
|
import kr.co.vividnext.sodalive.member.Member
|
||||||
import kr.co.vividnext.sodalive.notice.ServiceNoticeService
|
import kr.co.vividnext.sodalive.notice.ServiceNoticeService
|
||||||
|
@ -115,21 +114,4 @@ class AudioContentMainTabHomeService(
|
||||||
salesCountRankContentList = salesCountRankContentList
|
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
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,8 +82,7 @@ class RankingRepository(
|
||||||
audioContent.price,
|
audioContent.price,
|
||||||
audioContent.duration,
|
audioContent.duration,
|
||||||
member.id,
|
member.id,
|
||||||
member.nickname,
|
member.nickname
|
||||||
member.profileImage.prepend("/").prepend(imageHost)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -366,8 +365,7 @@ class RankingRepository(
|
||||||
audioContent.price,
|
audioContent.price,
|
||||||
audioContent.duration,
|
audioContent.duration,
|
||||||
member.id,
|
member.id,
|
||||||
member.nickname,
|
member.nickname
|
||||||
member.profileImage.prepend("/").prepend(imageHost)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.from(order)
|
.from(order)
|
||||||
|
@ -406,8 +404,7 @@ class RankingRepository(
|
||||||
audioContent.price,
|
audioContent.price,
|
||||||
audioContent.duration,
|
audioContent.duration,
|
||||||
member.id,
|
member.id,
|
||||||
member.nickname,
|
member.nickname
|
||||||
member.profileImage.prepend("/").prepend(imageHost)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.from(order)
|
.from(order)
|
||||||
|
|
Loading…
Reference in New Issue