마케팅 매체 파트너 코드 조회
- 전체 개수 추가
This commit is contained in:
@@ -50,8 +50,9 @@ class AdminAdMediaPartnerService(private val repository: AdMediaPartnerRepositor
|
||||
}
|
||||
}
|
||||
|
||||
fun getMediaPartnerList(offset: Long, limit: Long): List<GetAdminAdMediaPartnerResponse> {
|
||||
return repository.getMediaPartnerList(offset, limit)
|
||||
fun getMediaPartnerList(offset: Long, limit: Long): GetAdminAdMediaPartnerResponse {
|
||||
val totalCount = repository.getMediaPartnerListTotalCount()
|
||||
val items = repository.getMediaPartnerList(offset, limit)
|
||||
.map {
|
||||
val deepLinkValue = when (it.type) {
|
||||
AdMediaPartnerType.SERIES -> "series"
|
||||
@@ -77,6 +78,11 @@ class AdminAdMediaPartnerService(private val repository: AdMediaPartnerRepositor
|
||||
it.link = link
|
||||
it
|
||||
}
|
||||
|
||||
return GetAdminAdMediaPartnerResponse(
|
||||
totalCount = totalCount,
|
||||
items = items
|
||||
)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
@@ -3,7 +3,12 @@ package kr.co.vividnext.sodalive.admin.marketing
|
||||
import com.querydsl.core.annotations.QueryProjection
|
||||
import kr.co.vividnext.sodalive.marketing.AdMediaPartnerType
|
||||
|
||||
data class GetAdminAdMediaPartnerResponse @QueryProjection constructor(
|
||||
data class GetAdminAdMediaPartnerResponse(
|
||||
val totalCount: Int,
|
||||
val items: List<GetAdminAdMediaPartnerResponseItem>
|
||||
)
|
||||
|
||||
data class GetAdminAdMediaPartnerResponseItem @QueryProjection constructor(
|
||||
val id: Long,
|
||||
val mediaGroup: String,
|
||||
val pid: String,
|
||||
|
Reference in New Issue
Block a user