라이브 매출 API - 30분 캐시 적용
This commit is contained in:
		| @@ -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) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user