콘텐츠 누적 매출 API 추가 #79

Merged
klaus merged 4 commits from test into main 2023-11-13 13:42:18 +00:00
2 changed files with 3 additions and 17 deletions
Showing only changes of commit b7e4e6f43f - Show all commits

View File

@ -25,16 +25,7 @@ class AdminCalculateController(private val service: AdminCalculateService) {
) = ApiResponse.ok(service.getCalculateContentList(startDateStr, endDateStr))
@GetMapping("/cumulative-sales-by-content")
fun getCumulativeSalesByContent(
@RequestParam startDateStr: String,
@RequestParam endDateStr: String,
pageable: Pageable
) = ApiResponse.ok(
service.getCumulativeSalesByContent(
startDateStr,
endDateStr,
pageable.offset,
pageable.pageSize.toLong()
)
fun getCumulativeSalesByContent(pageable: Pageable) = ApiResponse.ok(
service.getCumulativeSalesByContent(pageable.offset, pageable.pageSize.toLong())
)
}

View File

@ -135,12 +135,7 @@ class AdminCalculateService(private val repository: AdminCalculateQueryRepositor
.toList()
}
fun getCumulativeSalesByContent(
startDateStr: String,
endDateStr: String,
offset: Long,
limit: Long
): GetCumulativeSalesByContentResponse {
fun getCumulativeSalesByContent(offset: Long, limit: Long): GetCumulativeSalesByContentResponse {
val totalCount = repository.getCumulativeSalesByContentTotalCount()
val items = repository
.getCumulativeSalesByContent(offset, limit)