feat: 管理后台订单列表显示来源域名(srcHost)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
erio
2026-03-03 00:19:01 +08:00
parent d952942627
commit c9462f4f14
3 changed files with 7 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ interface AdminOrder {
completedAt: string | null;
failedReason: string | null;
expiresAt: string;
srcHost: string | null;
}
interface AdminOrderDetail extends AdminOrder {

View File

@@ -42,6 +42,7 @@ export async function GET(request: NextRequest) {
completedAt: true,
failedReason: true,
expiresAt: true,
srcHost: true,
},
}),
prisma.order.count({ where }),

View File

@@ -15,6 +15,7 @@ interface Order {
completedAt: string | null;
failedReason: string | null;
expiresAt: string;
srcHost: string | null;
rechargeRetryable?: boolean;
}
@@ -49,6 +50,7 @@ export default function OrderTable({ orders, onRetry, onCancel, onViewDetail }:
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"></th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"></th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"></th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"></th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"></th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase text-gray-500"></th>
</tr>
@@ -79,6 +81,9 @@ export default function OrderTable({ orders, onRetry, onCancel, onViewDetail }:
<td className="whitespace-nowrap px-4 py-3 text-sm text-gray-500">
{order.paymentType === 'alipay' ? '支付宝' : '微信支付'}
</td>
<td className="whitespace-nowrap px-4 py-3 text-sm text-gray-500">
{order.srcHost || '-'}
</td>
<td className="whitespace-nowrap px-4 py-3 text-sm text-gray-500">
{new Date(order.createdAt).toLocaleString('zh-CN')}
</td>