feat(jd-collect): 进度/历史透传轮次游标 shopCatName/shopCatMerged——任务卡显示「正在采集分类」(多轮页码归 1 消歧,2026-11-21 方案 C 客户端侧配套)
客户端多选店内分类改逐分类轮次采集后,游标新增两键。HistoryItemVo/ProgressVo 加字段(注释与建单多选集合 shopCategoryNames 明确区分:这是「当前正在采的那一个」);BoardService#fillProgress 与 TaskService#queryProgress 读侧白名单逐键取(shopCatMerged 宽松布尔:true 字符串也认)。前端 toJdTaskView extraLines 加「正在采集分类:X(合并兜底时缀 等(页面筛选未生效,兜底翻页中))」。判据:JdCollectBoardServiceTest 游标键透传两支(selectList mock 必须 ArrayList 包 List.of——history 服务原地排序,不可变列表打爆)+jd-collect-progress.mount.test.ts 两支+jd-collect-tab.test.ts 源码绊线;门禁 mvn -o test-compile rc0+目标 49 绿、vue-tsc rc0、node --test 15 绿、vitest 24 绿。
This commit is contained in:
@@ -345,6 +345,12 @@ function toJdTaskView(item: JdCollectHistoryItemVo): TaskItemView {
|
||||
...(showProgress && typeof item.page === 'number' && item.page > 0
|
||||
? [`断点游标:第 ${item.page} 页 · 已回传 ${item.batches ?? 0} 批`]
|
||||
: []),
|
||||
// 逐分类轮次游标(2026-11-21 方案 C):多轮采集时页码归 1,靠「正在采集分类」
|
||||
// 消解「任务重跑了」的歧义;合并兜底轮(页面筛选未生效)明确标注,别让用户
|
||||
// 以为只采了 shopCatName 这一个分类。
|
||||
...(showProgress && item.shopCatName
|
||||
? [`正在采集分类:${item.shopCatName}${item.shopCatMerged ? ' 等(页面筛选未生效,兜底翻页中)' : ''}`]
|
||||
: []),
|
||||
...(item.errorMessage ? [`错误:${userNotice(item.errorMessage)}`] : []),
|
||||
],
|
||||
progress: showProgress ? { percent: progressPercent(item), countLabel: progressCountLabel(item) } : null,
|
||||
|
||||
@@ -33,6 +33,11 @@ export interface JdCollectProgressVo {
|
||||
total?: number;
|
||||
page?: number;
|
||||
listTab?: string;
|
||||
/** 正在采集的京麦店内分类名(客户端逐分类轮次游标 shopCatName——与建单多选集合
|
||||
* shopCategoryNames 区分,这是「当前正在采的那一个」;多轮页码归 1 时任务卡靠它消歧) */
|
||||
shopCatName?: string;
|
||||
/** 当前轮是否合并兜底(页面级筛选未生效,剩余分类并单轮行级过滤采完) */
|
||||
shopCatMerged?: boolean;
|
||||
batches?: number;
|
||||
message?: string;
|
||||
updatedAt?: string;
|
||||
@@ -181,6 +186,11 @@ export interface JdCollectHistoryItemVo {
|
||||
total?: number;
|
||||
page?: number;
|
||||
listTab?: string;
|
||||
/** 正在采集的京麦店内分类名(客户端逐分类轮次游标 shopCatName——与建单多选集合
|
||||
* shopCategoryNames 区分,这是「当前正在采的那一个」;多轮页码归 1 时任务卡靠它消歧) */
|
||||
shopCatName?: string;
|
||||
/** 当前轮是否合并兜底(页面级筛选未生效,剩余分类并单轮行级过滤采完) */
|
||||
shopCatMerged?: boolean;
|
||||
batches?: number;
|
||||
updatedAt?: string;
|
||||
createdAt?: string;
|
||||
|
||||
Reference in New Issue
Block a user