라이브 매출 API - 30분 캐시 적용
This commit is contained in:
parent
9458a3976b
commit
8da7ee0bb3
|
@ -12,6 +12,11 @@ import kotlin.math.roundToInt
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
class AdminCalculateService(private val repository: AdminCalculateQueryRepository) {
|
class AdminCalculateService(private val repository: AdminCalculateQueryRepository) {
|
||||||
|
@Transactional(readOnly = true)
|
||||||
|
@Cacheable(
|
||||||
|
cacheNames = ["default"],
|
||||||
|
key = "'calculateLive:' + " + "#startDateStr + ':' + #endDateStr"
|
||||||
|
)
|
||||||
fun getCalculateLive(startDateStr: String, endDateStr: String): List<GetCalculateLiveResponse> {
|
fun getCalculateLive(startDateStr: String, endDateStr: String): List<GetCalculateLiveResponse> {
|
||||||
val dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd")
|
val dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd")
|
||||||
val startDate = LocalDate.parse(startDateStr, dateTimeFormatter).atTime(0, 0, 0)
|
val startDate = LocalDate.parse(startDateStr, dateTimeFormatter).atTime(0, 0, 0)
|
||||||
|
|
Loading…
Reference in New Issue