콘텐츠 누적 매출 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)) ) = ApiResponse.ok(service.getCalculateContentList(startDateStr, endDateStr))
@GetMapping("/cumulative-sales-by-content") @GetMapping("/cumulative-sales-by-content")
fun getCumulativeSalesByContent( fun getCumulativeSalesByContent(pageable: Pageable) = ApiResponse.ok(
@RequestParam startDateStr: String, service.getCumulativeSalesByContent(pageable.offset, pageable.pageSize.toLong())
@RequestParam endDateStr: String,
pageable: Pageable
) = ApiResponse.ok(
service.getCumulativeSalesByContent(
startDateStr,
endDateStr,
pageable.offset,
pageable.pageSize.toLong()
)
) )
} }

View File

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