fix(pdd): 匹配诊断对齐 out_sku_sn,并加速拼多多订单号搜索
匹配测试/结构化规则补读商家编码,诊断日志标出缺失字段;订单/任务/工单关键词支持带连字符的 PDD order_sn 走索引快路径。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -169,7 +169,7 @@ export default function ProductMatchPanel() {
|
||||
|
||||
async function runMatchTest() {
|
||||
if (!testPayload.trim()) {
|
||||
message.warning('请选择或粘贴快手原始载荷')
|
||||
message.warning('请选择或粘贴原始订单载荷')
|
||||
return
|
||||
}
|
||||
try {
|
||||
@@ -194,7 +194,7 @@ export default function ProductMatchPanel() {
|
||||
|
||||
const sourceColumns: TableColumnsType<KuaishouMatchSource> = [
|
||||
{
|
||||
title: '快手商品 / SKU',
|
||||
title: '商品 / SKU',
|
||||
key: 'source',
|
||||
render: (_, row) => (
|
||||
<div className="cell-stack">
|
||||
@@ -252,17 +252,30 @@ export default function ProductMatchPanel() {
|
||||
{
|
||||
title: '店铺 / 商品 / SKU',
|
||||
key: 'target',
|
||||
render: (_, row) => (
|
||||
<div className="cell-stack">
|
||||
<Typography.Text ellipsis={{ tooltip: row.itemTitle }}>
|
||||
{row.itemTitle || '-'}
|
||||
</Typography.Text>
|
||||
<Typography.Text type="secondary" style={{ fontSize: 12 }}>
|
||||
{formatShopLabel(row.sellerId, shopNameBySellerId)} ·{' '}
|
||||
{row.skuNick || row.relSkuId || '商品默认'}
|
||||
</Typography.Text>
|
||||
</div>
|
||||
),
|
||||
render: (_, row) => {
|
||||
const payload = (row.rawPayload || {}) as Record<string, unknown>
|
||||
const outSkuSn = String(payload.out_sku_sn || payload.outSkuSn || '').trim()
|
||||
const skuLabel = outSkuSn || row.skuNick || row.relSkuId || ''
|
||||
return (
|
||||
<div className="cell-stack">
|
||||
<Typography.Text ellipsis={{ tooltip: row.itemTitle }}>
|
||||
{row.itemTitle || '-'}
|
||||
</Typography.Text>
|
||||
<Typography.Text type="secondary" style={{ fontSize: 12 }}>
|
||||
{formatShopLabel(row.sellerId, shopNameBySellerId)} ·{' '}
|
||||
{skuLabel ? (
|
||||
<Typography.Text type={outSkuSn ? undefined : 'secondary'} style={{ fontSize: 12 }}>
|
||||
{outSkuSn ? `编码 ${skuLabel}` : skuLabel}
|
||||
</Typography.Text>
|
||||
) : (
|
||||
<Typography.Text type="danger" style={{ fontSize: 12 }}>
|
||||
无 out_sku_sn
|
||||
</Typography.Text>
|
||||
)}
|
||||
</Typography.Text>
|
||||
</div>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '结果',
|
||||
@@ -345,7 +358,7 @@ export default function ProductMatchPanel() {
|
||||
showSearch
|
||||
optionFilterProp="label"
|
||||
style={{ minWidth: 360 }}
|
||||
placeholder="选择已接收的快手原始载荷"
|
||||
placeholder="选择已接收的原始载荷"
|
||||
options={sources.map((source, index) => ({
|
||||
value: index,
|
||||
label: `${formatShopLabel(source.sellerId, shopNameBySellerId)} · ${source.itemTitle} · ${source.skuNick || '商品默认'}`,
|
||||
@@ -363,7 +376,7 @@ export default function ProductMatchPanel() {
|
||||
value={testPayload}
|
||||
onChange={(event) => setTestPayload(event.target.value)}
|
||||
rows={16}
|
||||
placeholder="粘贴快手 send-code 原始载荷"
|
||||
placeholder="粘贴快手 send-code 或拼多多订单原始载荷(含 out_sku_sn)"
|
||||
/>
|
||||
{testResult ? (
|
||||
<div className="page-stack">
|
||||
@@ -380,7 +393,10 @@ export default function ProductMatchPanel() {
|
||||
: '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="具体 SKU">
|
||||
{testResult.context.skuNick || '-'}
|
||||
{testResult.context.skuNick || testResult.context.relSkuId || '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="商品 ID">
|
||||
{testResult.context.relItemId || '-'}
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
<JsonPreview
|
||||
|
||||
Reference in New Issue
Block a user