fix(jd-publish): 重试复位后带回直推载荷+克隆缺源身份文案分档——35147 重试实录三件
This commit is contained in:
@@ -386,6 +386,14 @@ function validationFailureNotice(item: JdPublishHistoryItemVo) {
|
||||
: '请保留已发布结果,核对京麦中的发布状态,然后重新选择未发布商品建单。'),
|
||||
}
|
||||
}
|
||||
// 2026-11-21 四商品实测:京麦对「上架中」源商品的克隆页响应字段齐全但 productId/spuId
|
||||
// 恒为 0——不是店铺归属问题,别把用户引去切店铺(切了也一样);只有其余形状才是换店信号。
|
||||
if (detail.includes('未携带源商品身份')) {
|
||||
return {
|
||||
title: '本店源商品校验失败',
|
||||
body: addAction('京麦未把该商品当作本店可克隆源(实测「上架中」商品如此),请改用「已下架」等非在售商品建单。'),
|
||||
}
|
||||
}
|
||||
return {
|
||||
title: '本店源商品校验失败',
|
||||
body: addAction('请切换到正确店铺后重试,或重新选择本店商品建单。'),
|
||||
@@ -480,7 +488,10 @@ async function retryTaskRecord(item: JdPublishHistoryItemVo | null | undefined)
|
||||
const vo = await retryJdPublishBrand(taskId, brand, resumeAttempt)
|
||||
nextPayload = vo.queuePayload
|
||||
} else {
|
||||
await retryClientTask(taskId)
|
||||
// 2026-11-21:复位是 PENDING,服务端兜底拉取默认关闭——不把响应带回的直推载荷
|
||||
// 推回本机队列,任务会停在 PENDING 直到有人手动干预(35147 重试实录)。
|
||||
const result = await retryClientTask(taskId)
|
||||
nextPayload = result?.queuePayload ?? undefined
|
||||
}
|
||||
retryAttemptFloor.set(taskId, resumeAttempt + 1)
|
||||
} catch (error) {
|
||||
@@ -498,17 +509,21 @@ async function retryTaskRecord(item: JdPublishHistoryItemVo | null | undefined)
|
||||
const pushNote = await pushToClientQueue(nextPayload, '已修改品牌并重试')
|
||||
ElMessage.success(pushNote ?? '已修改品牌并重试,任务已送入本机队列')
|
||||
} else {
|
||||
ElMessage.success(isResume ? '已提交继续,等待本机客户端领取' : '已提交原任务重试,等待本机客户端领取')
|
||||
// 服务端带回直推载荷时推回本机队列并立即提示;拿不到(非本机执行模块/服务端未升级)
|
||||
// 才退回「等待领取」的旧口径——文案与实际去向一致,不再让用户空等。
|
||||
const pushNote = await pushToClientQueue(nextPayload, isResume ? '已提交继续' : '已提交原任务重试')
|
||||
ElMessage.success(pushNote ?? `${isResume ? '已提交继续' : '已提交原任务重试'},任务已送入本机队列`)
|
||||
}
|
||||
await refreshBoard().catch((error) => console.error('[jd-publish] 重试后刷新任务失败', error))
|
||||
}
|
||||
|
||||
/** 手动刷新:强拉历史 + 统计 + 当前轮询任务进度 */
|
||||
/** 手动刷新:强拉历史 + 统计 + 当前轮询任务进度 + 分组(计数是服务端聚合,归类后旧值过时) */
|
||||
async function refreshBoard() {
|
||||
await Promise.all([
|
||||
board.loadDashboard(),
|
||||
board.loadHistory({ force: true }),
|
||||
board.refreshTaskProgress(),
|
||||
loadGroups().catch(() => undefined),
|
||||
])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user