Compare commits

...

2 Commits

Author SHA1 Message Date
linkeyu 9df6a2d792 功能:展示比价记录是否下单
在比价记录的省金额列后新增是否下单列,并同步接口类型。
2026-07-27 14:56:55 +08:00
linkeyu f63378ebd4 修复纯展示广告明细类型字段缺失 (#86)
## 问题

impressionOnlyDetail 返回 AdRevenueDetailRow 时缺少 AdRevenueRecord 的必填字段 adn 和 slot_id,导致 next build 在类型检查阶段失败。

## 修复

- 从 AdRevenueRow 透传 adn
- 从 AdRevenueRow 透传 slot_id
- 保留 source_adn 的现有展示口径

## 验证

- npm run build 通过
- TypeScript 类型检查通过
- 生产静态页面生成通过

---------

Co-authored-by: linkeyu <798648091@qq.com>
Reviewed-on: #86
Co-authored-by: linkeyu <linkeyu@wonderable.ai>
Co-committed-by: linkeyu <linkeyu@wonderable.ai>
2026-07-27 14:18:40 +08:00
3 changed files with 11 additions and 0 deletions
@@ -242,6 +242,8 @@ function impressionOnlyDetail(row: AdRevenueRow): AdRevenueDetailRow {
expected_coin: 0,
actual_coin: 0,
matched: true,
adn: row.adn,
slot_id: row.slot_id,
source_adn: row.adn,
is_impression_only: true,
};
@@ -298,6 +298,14 @@ export default function ComparisonRecordsPage() {
<b style={{ color: r.saved_amount_cents > 0 ? '#3f8600' : '#999' }}>{yuan(r.saved_amount_cents)}</b>
),
},
{
title: '是否下单',
dataIndex: 'ordered',
width: 84,
render: (ordered: boolean) => (
<Tag color={ordered ? 'green' : 'default'}>{ordered ? '已下单' : '未下单'}</Tag>
),
},
{ title: 'LLM', dataIndex: 'llm_call_count', width: 56, render: (v) => v ?? '-' },
{
title: 'TOKEN',
+1
View File
@@ -449,6 +449,7 @@ export interface ComparisonRecordListItem {
source_price_cents: number | null;
best_price_cents: number | null;
saved_amount_cents: number | null;
ordered: boolean;
total_ms: number | null;
step_count: number | null;
llm_call_count: number | null;