콘텐츠별 누적정산

- 취소된 주문은 반영되지 않도록 수정
This commit is contained in:
Klaus 2024-05-21 15:29:30 +09:00
parent b0988cca70
commit c406d21674
2 changed files with 10 additions and 2 deletions

View File

@ -92,6 +92,7 @@ class AdminCalculateQueryRepository(private val queryFactory: JPAQueryFactory) {
.from(order)
.innerJoin(order.audioContent, audioContent)
.innerJoin(audioContent.member, member)
.where(order.isActive.isTrue)
.groupBy(member.id, audioContent.id, order.can)
.fetch()
.size
@ -113,6 +114,7 @@ class AdminCalculateQueryRepository(private val queryFactory: JPAQueryFactory) {
.from(order)
.innerJoin(order.audioContent, audioContent)
.innerJoin(audioContent.member, member)
.where(order.isActive.isTrue)
.groupBy(member.id, audioContent.id, order.type, order.can)
.offset(offset)
.limit(limit)

View File

@ -147,7 +147,10 @@ class CreatorAdminCalculateQueryRepository(private val queryFactory: JPAQueryFac
.from(order)
.innerJoin(order.audioContent, audioContent)
.innerJoin(audioContent.member, member)
.where(audioContent.member.id.eq(memberId))
.where(
audioContent.member.id.eq(memberId)
.and(order.isActive.isTrue)
)
.groupBy(member.id, audioContent.id, order.can)
.fetch()
.size
@ -173,7 +176,10 @@ class CreatorAdminCalculateQueryRepository(private val queryFactory: JPAQueryFac
.from(order)
.innerJoin(order.audioContent, audioContent)
.innerJoin(audioContent.member, member)
.where(audioContent.member.id.eq(memberId))
.where(
audioContent.member.id.eq(memberId)
.and(order.isActive.isTrue)
)
.groupBy(member.id, audioContent.id, order.type, order.can)
.offset(offset)
.limit(limit)