test #123

Merged
klaus merged 9 commits from test into main 2024-02-05 02:12:10 +00:00
2 changed files with 5 additions and 6 deletions
Showing only changes of commit e1ea1f14a5 - Show all commits

View File

@ -65,6 +65,7 @@ class AdminCalculateQueryRepository(private val queryFactory: JPAQueryFactory) {
.where( .where(
order.createdAt.goe(startDate) order.createdAt.goe(startDate)
.and(order.createdAt.loe(endDate)) .and(order.createdAt.loe(endDate))
.and(order.isActive.isTrue)
) )
.groupBy(audioContent.id, order.type, orderFormattedDate, order.can) .groupBy(audioContent.id, order.type, orderFormattedDate, order.can)
.orderBy(member.id.desc(), orderFormattedDate.desc(), audioContent.id.asc()) .orderBy(member.id.desc(), orderFormattedDate.desc(), audioContent.id.asc())

View File

@ -116,16 +116,14 @@ class CreatorAdminCalculateQueryRepository(private val queryFactory: JPAQueryFac
order.can.sum() order.can.sum()
) )
) )
.from(useCanCalculate) .from(order)
.innerJoin(useCanCalculate.useCan, useCan)
.innerJoin(useCan.order, order)
.innerJoin(order.audioContent, audioContent) .innerJoin(order.audioContent, audioContent)
.innerJoin(audioContent.member, member) .innerJoin(audioContent.member, member)
.where( .where(
useCanCalculate.status.eq(UseCanCalculateStatus.RECEIVED) order.createdAt.goe(startDate)
.and(useCanCalculate.recipientCreatorId.eq(memberId))
.and(order.createdAt.goe(startDate))
.and(order.createdAt.loe(endDate)) .and(order.createdAt.loe(endDate))
.and(order.isActive.isTrue)
.and(order.creator.id.eq(memberId))
) )
.groupBy(audioContent.id, order.type, orderFormattedDate, order.can) .groupBy(audioContent.id, order.type, orderFormattedDate, order.can)
.offset(offset) .offset(offset)