fix: 修复订单列表不能查看的问题

This commit is contained in:
richarjiang
2026-04-10 23:07:56 +08:00
parent 54e30da003
commit 0810f71250
4 changed files with 142 additions and 37 deletions

View File

@@ -15,7 +15,7 @@ export interface CreateOrderResult {
}
export interface PaginatedOrders<T> {
data: T[]
items: T[]
total: number
page: number
limit: number
@@ -176,7 +176,7 @@ export class PaymentService {
])
return {
data: data.map((o) => ({ ...o, cardType: { ...o.cardType } })),
items: data.map((o) => ({ ...o, cardType: { ...o.cardType } })),
total,
page,
limit,
@@ -207,8 +207,9 @@ export class PaymentService {
this.prisma.order.count({ where }),
])
this.logger.log(`getAllOrders: page=${page}, limit=${limit}, status=${status}, count=${total}`)
return {
data: data.map((o) => ({
items: data.map((o) => ({
...o,
cardType: { ...o.cardType },
user: { ...o.user },