크리에이터 관리자 - 콘텐츠 누적 매출 API #81

Merged
klaus merged 4 commits from test into main 2023-11-13 15:23:54 +00:00
1 changed files with 5 additions and 0 deletions
Showing only changes of commit 8da7ee0bb3 - Show all commits

View File

@ -12,6 +12,11 @@ import kotlin.math.roundToInt
@Service
class AdminCalculateService(private val repository: AdminCalculateQueryRepository) {
@Transactional(readOnly = true)
@Cacheable(
cacheNames = ["default"],
key = "'calculateLive:' + " + "#startDateStr + ':' + #endDateStr"
)
fun getCalculateLive(startDateStr: String, endDateStr: String): List<GetCalculateLiveResponse> {
val dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd")
val startDate = LocalDate.parse(startDateStr, dateTimeFormatter).atTime(0, 0, 0)