Compare commits

...

4 Commits

2 changed files with 5 additions and 4 deletions

View File

@ -96,8 +96,8 @@ class CreatorAdminCalculateQueryRepository(private val queryFactory: JPAQueryFac
startDate: LocalDateTime,
endDate: LocalDateTime,
memberId: Long,
offset: Long = 0,
limit: Long = 20
offset: Long,
limit: Long
): List<GetCalculateContentQueryData> {
val orderFormattedDate = getFormattedDate(order.createdAt)
return queryFactory
@ -125,9 +125,9 @@ class CreatorAdminCalculateQueryRepository(private val queryFactory: JPAQueryFac
.and(order.createdAt.loe(endDate))
)
.groupBy(audioContent.id, order.type, orderFormattedDate, order.can)
.orderBy(member.id.desc(), orderFormattedDate.desc(), audioContent.id.asc())
.offset(offset)
.limit(limit)
.orderBy(member.id.desc(), orderFormattedDate.desc(), audioContent.id.asc())
.fetch()
}

View File

@ -87,7 +87,8 @@ class CreatorAdminCalculateService(private val repository: CreatorAdminCalculate
@Transactional(readOnly = true)
@Cacheable(
cacheNames = ["cache_ttl_3_hours"],
key = "'creatorCalculateContentList:' + " + "#memberId + ':' + #startDateStr + ':' + #endDateStr"
key = "'creatorCalculateContentList:' + " +
"#startDateStr + ':' + #endDateStr + ':' + #memberId + ':' + #offset + ':' + #limit"
)
fun getCalculateContentList(
startDateStr: String,