Compare commits

..

2 Commits

Author SHA1 Message Date
klaus 43279541dd Merge pull request '콘텐츠별 누적정산' (#181) from test into main
Reviewed-on: #181
2024-05-21 06:37:51 +00:00
Klaus c406d21674 콘텐츠별 누적정산
- 취소된 주문은 반영되지 않도록 수정
2024-05-21 15:29:30 +09:00
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)