处理修复BUG

This commit is contained in:
super
2026-06-14 16:48:20 +08:00
parent 8672668c33
commit ac19637ad6
18 changed files with 908 additions and 283 deletions

View File

@@ -799,7 +799,9 @@ async function runMatch() {
countryCodes: resolveCountryCodesForRequest(),
})
const batch = res.items || []
matchAsinRowsByCountry.value = res.asinRowsByCountry || {}
// 移除:不再使用后端返回的 ASIN 数据
// matchAsinRowsByCountry.value = res.asinRowsByCountry || {}
matchAsinRowsByCountry.value = {}
const nextByShop = new Map(
matchedItems.value.map((item) => [((item.shopName || '').trim()), item] as const),
)
@@ -989,9 +991,6 @@ async function pushToPythonQueueLegacy() {
function buildQueuePayload(taskVo: PriceTrackCreateTaskVo, row: PriceTrackShopQueueItem) {
const taskItem = taskVo.items?.[0]
const shopName = (row.shopName || '').trim()
const skipAsinsByCountry = row.skipAsins || taskVo.skipAsinsByCountry || {}
const skipAsinDetailsByCountry = taskVo.skipAsinDetailsByCountry || {}
const minimumPriceByCountryAndAsin = taskVo.minimumPriceByCountryAndAsin || {}
const skipAsinDeletePolicy = buildSkipAsinDeletePolicy()
const resultId = taskItem?.resultId ?? null
const loopRunId = taskItem?.loopRunId ?? null
@@ -1001,6 +1000,7 @@ function buildQueuePayload(taskVo: PriceTrackCreateTaskVo, row: PriceTrackShopQu
const error = taskItem?.error || null
const outputFilename = taskItem?.outputFilename || null
const downloadUrl = taskItem?.downloadUrl || null
return {
type: 'price-track-run',
ts: Date.now(),
@@ -1024,16 +1024,14 @@ function buildQueuePayload(taskVo: PriceTrackCreateTaskVo, row: PriceTrackShopQu
round_index: roundIndex,
country_codes: resolveCountryCodesForRequest(),
mode: statusModeEnabled.value ? 'status' : 'asin',
skip_asins: skipAsinsByCountry,
skip_asins_by_country: skipAsinsByCountry,
skip_asin_details_by_country: skipAsinDetailsByCountry,
minimum_price_by_country_and_asin: minimumPriceByCountryAndAsin,
// 分页拉取配置Python 端统一处理)
use_paginated_skip_asins: true,
skip_asin_page_size: 1000,
// 移除:不再传递任何 ASIN 数据Python 端统一分页拉取
skip_asin_delete_policy: skipAsinDeletePolicy,
delete_skip_asin_when_price_below_minimum: skipAsinDeletePolicy.deleteWhenPriceBelowMinimum,
deleteSkipAsinWhenPriceBelowMinimum: skipAsinDeletePolicy.deleteWhenPriceBelowMinimum,
asin_rows_by_country: Object.keys(matchAsinRowsByCountry.value).length
? matchAsinRowsByCountry.value
: (taskVo.asinRowsByCountry || {}),
// 兼容字段
taskId: taskVo.taskId,
resultId: resultId,
shopName,