mockpay功能调试
CI / verify (pull_request) Has been cancelled

This commit is contained in:
2026-08-20 00:51:18 +08:00
parent 2f633b307c
commit 4db21cf1a1
11 changed files with 320 additions and 531 deletions
@@ -25,15 +25,15 @@ export class AdminOrdersService {
private readonly adminRedeemService: AdminRedeemService,
) {}
/** v3.5.1 #1:发布会大屏,返回全部订单(按时间倒序,上限 2000) */
/** v3.5.1 #1:发布会大屏,仅已付款订单;按付款时间倒序 */
async listBigScreen(limit?: string) {
const take = Math.min(Math.max(Number(limit) || 2000, 1), 2000);
const orders = await this.prisma.order.findMany({
where: {
isTest: false,
payAmount: { gte: 100 },
payStatus: 'PAID',
},
orderBy: { createdAt: 'desc' },
orderBy: [{ paidAt: 'desc' }, { createdAt: 'desc' }],
take,
include: { user: { select: { phone: true } } },
});
@@ -41,12 +41,14 @@ export class AdminOrdersService {
items: orders.map((o) => {
const spec = o.productSpec ? ` ${o.productSpec}` : '';
const phone = o.user?.phone || o.receiverPhone;
const paidAt = o.paidAt?.toISOString() ?? o.createdAt.toISOString();
return {
id: o.id.toString(),
orderNo: o.orderNo,
payAmount: Number(o.payAmount),
items: `${o.productName}${spec} × ${o.quantity}`,
createdAt: o.createdAt.toISOString(),
createdAt: paidAt,
paidAt,
userPhoneMasked: phone ? maskContactPhone(phone) : null,
};
}),