redis를 이전하기 위해 설정했던 모든 커밋 Revert
This commit is contained in:
@@ -2,12 +2,17 @@ package kr.co.vividnext.sodalive.admin.calculate
|
||||
|
||||
import kr.co.vividnext.sodalive.creator.admin.calculate.GetCreatorCalculateCommunityPostResponse
|
||||
import kr.co.vividnext.sodalive.extensions.convertLocalDateTime
|
||||
import org.springframework.cache.annotation.Cacheable
|
||||
import org.springframework.stereotype.Service
|
||||
import org.springframework.transaction.annotation.Transactional
|
||||
|
||||
@Service
|
||||
class AdminCalculateService(private val repository: AdminCalculateQueryRepository) {
|
||||
@Transactional(readOnly = true)
|
||||
@Cacheable(
|
||||
cacheNames = ["cache_ttl_3_hours"],
|
||||
key = "'calculateLive:' + " + "#startDateStr + ':' + #endDateStr"
|
||||
)
|
||||
fun getCalculateLive(startDateStr: String, endDateStr: String): List<GetCalculateLiveResponse> {
|
||||
val startDate = startDateStr.convertLocalDateTime()
|
||||
val endDate = endDateStr.convertLocalDateTime(hour = 23, minute = 59, second = 59)
|
||||
@@ -18,6 +23,10 @@ class AdminCalculateService(private val repository: AdminCalculateQueryRepositor
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
@Cacheable(
|
||||
cacheNames = ["cache_ttl_3_hours"],
|
||||
key = "'calculateContent:' + " + "#startDateStr + ':' + #endDateStr"
|
||||
)
|
||||
fun getCalculateContentList(startDateStr: String, endDateStr: String): List<GetCalculateContentResponse> {
|
||||
val startDate = startDateStr.convertLocalDateTime()
|
||||
val endDate = endDateStr.convertLocalDateTime(hour = 23, minute = 59, second = 59)
|
||||
@@ -28,6 +37,10 @@ class AdminCalculateService(private val repository: AdminCalculateQueryRepositor
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
@Cacheable(
|
||||
cacheNames = ["cache_ttl_3_hours"],
|
||||
key = "'cumulativeSalesByContent:' + " + "#offset + ':' + #limit"
|
||||
)
|
||||
fun getCumulativeSalesByContent(offset: Long, limit: Long): GetCumulativeSalesByContentResponse {
|
||||
val totalCount = repository.getCumulativeSalesByContentTotalCount()
|
||||
val items = repository
|
||||
@@ -38,6 +51,10 @@ class AdminCalculateService(private val repository: AdminCalculateQueryRepositor
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
@Cacheable(
|
||||
cacheNames = ["cache_ttl_3_hours"],
|
||||
key = "'calculateContentDonationList2:' + " + "#startDateStr + ':' + #endDateStr"
|
||||
)
|
||||
fun getCalculateContentDonationList(
|
||||
startDateStr: String,
|
||||
endDateStr: String
|
||||
@@ -51,6 +68,10 @@ class AdminCalculateService(private val repository: AdminCalculateQueryRepositor
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
@Cacheable(
|
||||
cacheNames = ["cache_ttl_3_hours"],
|
||||
key = "'calculateCommunityPost:' + " + "#startDateStr + ':' + #endDateStr + ':' + #offset"
|
||||
)
|
||||
fun getCalculateCommunityPost(
|
||||
startDateStr: String,
|
||||
endDateStr: String,
|
||||
|
Reference in New Issue
Block a user