feat: 管理后台订单列表显示来源域名(srcHost)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ interface AdminOrder {
|
|||||||
completedAt: string | null;
|
completedAt: string | null;
|
||||||
failedReason: string | null;
|
failedReason: string | null;
|
||||||
expiresAt: string;
|
expiresAt: string;
|
||||||
|
srcHost: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AdminOrderDetail extends AdminOrder {
|
interface AdminOrderDetail extends AdminOrder {
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export async function GET(request: NextRequest) {
|
|||||||
completedAt: true,
|
completedAt: true,
|
||||||
failedReason: true,
|
failedReason: true,
|
||||||
expiresAt: true,
|
expiresAt: true,
|
||||||
|
srcHost: true,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
prisma.order.count({ where }),
|
prisma.order.count({ where }),
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ interface Order {
|
|||||||
completedAt: string | null;
|
completedAt: string | null;
|
||||||
failedReason: string | null;
|
failedReason: string | null;
|
||||||
expiresAt: string;
|
expiresAt: string;
|
||||||
|
srcHost: string | null;
|
||||||
rechargeRetryable?: boolean;
|
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>
|
||||||
|
<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>
|
</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">
|
<td className="whitespace-nowrap px-4 py-3 text-sm text-gray-500">
|
||||||
{order.paymentType === 'alipay' ? '支付宝' : '微信支付'}
|
{order.paymentType === 'alipay' ? '支付宝' : '微信支付'}
|
||||||
</td>
|
</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">
|
<td className="whitespace-nowrap px-4 py-3 text-sm text-gray-500">
|
||||||
{new Date(order.createdAt).toLocaleString('zh-CN')}
|
{new Date(order.createdAt).toLocaleString('zh-CN')}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user