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:
+9
@@ -69,6 +69,15 @@ public class JdCollectHistoryItemVo {
|
||||
@Schema(description = "当前采集 Tab(ONSALE/OFFSALE)")
|
||||
private String listTab;
|
||||
|
||||
@Schema(description = "正在采集的京麦店内分类名(客户端逐分类轮次游标 shopCatName;"
|
||||
+ "与建单多选集合 shopCategoryNames 区分——这是「当前正在采的那一个」。"
|
||||
+ "多轮页码归 1 时任务卡靠它消歧;非轮次任务为空)")
|
||||
private String shopCatName;
|
||||
|
||||
@Schema(description = "当前轮是否合并兜底(客户端页面级筛选未生效,剩余分类并单轮"
|
||||
+ "行级过滤采完,游标 shopCatMerged)")
|
||||
private Boolean shopCatMerged;
|
||||
|
||||
@Schema(description = "已收到的分片批次数")
|
||||
private Integer batches;
|
||||
|
||||
|
||||
+6
@@ -35,6 +35,12 @@ public class JdCollectProgressVo {
|
||||
/** 当前采集 Tab(ONSALE / OFFSALE)。 */
|
||||
private String listTab;
|
||||
|
||||
/** 正在采集的京麦店内分类名(客户端逐分类轮次游标 shopCatName;非轮次任务为 null)。 */
|
||||
private String shopCatName;
|
||||
|
||||
/** 当前轮是否合并兜底(页面级筛选未生效,剩余分类并单轮行级过滤;游标 shopCatMerged)。 */
|
||||
private Boolean shopCatMerged;
|
||||
|
||||
/** 已收到的分片批次数。 */
|
||||
private Integer batches;
|
||||
|
||||
|
||||
+9
@@ -206,6 +206,15 @@ public class JdCollectBoardService {
|
||||
item.setPage(JdScopeStateReader.asNullableInt(cursor.get("page")));
|
||||
Object tab = cursor.get("tab");
|
||||
item.setListTab(tab == null ? null : String.valueOf(tab));
|
||||
// 逐分类轮次游标(2026-11-21 方案 C):shopCatName=当前正在采的那一个店内
|
||||
// 分类(与建单多选集合 shopCategoryNames 区分),shopCatMerged=该轮合并兜底。
|
||||
// 值为 null 视为没带(mergeCursor 语义),非轮次任务两键缺省为空。
|
||||
Object shopCatName = cursor.get("shopCatName");
|
||||
item.setShopCatName(shopCatName == null ? null : String.valueOf(shopCatName));
|
||||
Object shopCatMerged = cursor.get("shopCatMerged");
|
||||
item.setShopCatMerged(shopCatMerged == null ? null
|
||||
: Boolean.TRUE.equals(shopCatMerged)
|
||||
|| "true".equalsIgnoreCase(String.valueOf(shopCatMerged)));
|
||||
item.setBatches(scope.getReceivedChunkCount() == null ? 0 : scope.getReceivedChunkCount());
|
||||
}
|
||||
if (scope != null && scope.getUpdatedAt() != null) {
|
||||
|
||||
+7
@@ -289,6 +289,13 @@ public class JdCollectTaskService {
|
||||
vo.setPage(JdScopeStateReader.asNullableInt(cursor.get("page")));
|
||||
Object tab = cursor.get("tab");
|
||||
vo.setListTab(tab == null ? null : String.valueOf(tab));
|
||||
// 逐分类轮次游标(2026-11-21 方案 C),与 JdCollectBoardService#fillProgress 同口径。
|
||||
Object shopCatName = cursor.get("shopCatName");
|
||||
vo.setShopCatName(shopCatName == null ? null : String.valueOf(shopCatName));
|
||||
Object shopCatMerged = cursor.get("shopCatMerged");
|
||||
vo.setShopCatMerged(shopCatMerged == null ? null
|
||||
: Boolean.TRUE.equals(shopCatMerged)
|
||||
|| "true".equalsIgnoreCase(String.valueOf(shopCatMerged)));
|
||||
vo.setBatches(scope.getReceivedChunkCount() == null ? 0 : scope.getReceivedChunkCount());
|
||||
if (scope.getUpdatedAt() != null) {
|
||||
vo.setUpdatedAt(scope.getUpdatedAt());
|
||||
|
||||
Reference in New Issue
Block a user