fix: wrong condition
This commit is contained in:
parent
c399cd26df
commit
b5cdb24228
1 changed files with 6 additions and 3 deletions
|
|
@ -58,18 +58,21 @@ export class InvoiceController extends Controller {
|
|||
prisma.invoice.count({
|
||||
where: {
|
||||
...where,
|
||||
payment: { paymentStatus: { not: PaymentStatus.PaymentSuccess } },
|
||||
payment: { paymentStatus: PaymentStatus.PaymentSuccess },
|
||||
},
|
||||
}),
|
||||
prisma.invoice.count({
|
||||
where: {
|
||||
...where,
|
||||
payment: { paymentStatus: PaymentStatus.PaymentSuccess },
|
||||
payment: { paymentStatus: { not: PaymentStatus.PaymentSuccess } },
|
||||
},
|
||||
}),
|
||||
]);
|
||||
|
||||
return { pay, notPay };
|
||||
return {
|
||||
[PaymentStatus.PaymentSuccess]: pay,
|
||||
[PaymentStatus.PaymentWait]: notPay,
|
||||
};
|
||||
}
|
||||
|
||||
@Get()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue