jd(后管): 京东商品详情/列表 VO 暴露 manualLocked(V199 人工锁可观测面缺口,2026-11-23 E2E 窗)——编辑置锁后前端无从展示「该行被锁、采集不再覆盖」;Detail/ListItem 两 VO 加字段+QueryService 两处装配搬运,测试钉详情与列表双出口;只展示不承载权限,未随 jar 发版(随下一窗上线)
This commit is contained in:
+3
@@ -110,6 +110,9 @@ public class JdProductDetailVo {
|
|||||||
@Schema(description = "同步时刻")
|
@Schema(description = "同步时刻")
|
||||||
private LocalDateTime syncedAt;
|
private LocalDateTime syncedAt;
|
||||||
|
|
||||||
|
@Schema(description = "人工编辑锁(V199):1=后管编辑保存过,采集 upsert/图片与 SKU 登记对该行跳过;仅展示,不承载权限")
|
||||||
|
private Integer manualLocked;
|
||||||
|
|
||||||
@Schema(description = "属性分组(attr_json 的 tabs 数组映射;形状不识别时为空列表)")
|
@Schema(description = "属性分组(attr_json 的 tabs 数组映射;形状不识别时为空列表)")
|
||||||
private List<AttrGroupVo> attrGroups;
|
private List<AttrGroupVo> attrGroups;
|
||||||
|
|
||||||
|
|||||||
+3
@@ -90,4 +90,7 @@ public class JdProductListItemVo {
|
|||||||
|
|
||||||
@Schema(description = "同步时刻")
|
@Schema(description = "同步时刻")
|
||||||
private LocalDateTime syncedAt;
|
private LocalDateTime syncedAt;
|
||||||
|
|
||||||
|
@Schema(description = "人工编辑锁(V199):1=后管编辑保存过,采集对该行跳过;列表可见,不承载权限")
|
||||||
|
private Integer manualLocked;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -304,6 +304,7 @@ public class JdProductQueryService {
|
|||||||
fillCategory(vo, row.getId(), ownerGroupId);
|
fillCategory(vo, row.getId(), ownerGroupId);
|
||||||
vo.setCollectBatchId(row.getCollectBatchId());
|
vo.setCollectBatchId(row.getCollectBatchId());
|
||||||
vo.setSyncedAt(row.getSyncedAt());
|
vo.setSyncedAt(row.getSyncedAt());
|
||||||
|
vo.setManualLocked(row.getManualLocked());
|
||||||
parseAttrGroups(vo, row.getAttrJson());
|
parseAttrGroups(vo, row.getAttrJson());
|
||||||
vo.setImages(loadImages(row.getId()));
|
vo.setImages(loadImages(row.getId()));
|
||||||
vo.setSkus(loadSkus(row.getId()));
|
vo.setSkus(loadSkus(row.getId()));
|
||||||
@@ -366,6 +367,7 @@ public class JdProductQueryService {
|
|||||||
vo.setAttrCount(row.getAttrCount());
|
vo.setAttrCount(row.getAttrCount());
|
||||||
vo.setImageCount(row.getImageCount());
|
vo.setImageCount(row.getImageCount());
|
||||||
vo.setSyncedAt(row.getSyncedAt());
|
vo.setSyncedAt(row.getSyncedAt());
|
||||||
|
vo.setManualLocked(row.getManualLocked());
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+21
@@ -148,4 +148,25 @@ class JdProductQueryServiceUserPageTest {
|
|||||||
assertThat(huge.getPage()).as("页码上限钳到 10000(乘积不溢出,铁律 15 同形)").isEqualTo(10000L);
|
assertThat(huge.getPage()).as("页码上限钳到 10000(乘积不溢出,铁律 15 同形)").isEqualTo(10000L);
|
||||||
verify(jdProductMapper, never()).selectList(any());
|
verify(jdProductMapper, never()).selectList(any());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void 详情与列表都带回人工编辑锁_锁行可观测面() {
|
||||||
|
// 2026-11-23 E2E 窗发现的缺口:V199 人工锁在编辑侧已置 1,但详情/列表 VO 不暴露,
|
||||||
|
// 前端无从展示「该行被锁、采集不再覆盖」。只搬运展示,不承载权限。
|
||||||
|
JdProductEntity row = product(21L);
|
||||||
|
row.setManualLocked(1);
|
||||||
|
when(jdProductMapper.selectById(21L)).thenReturn(row);
|
||||||
|
when(jdProductImageMapper.selectList(any())).thenReturn(List.of());
|
||||||
|
when(jdProductSkuMapper.selectList(any())).thenReturn(List.of());
|
||||||
|
|
||||||
|
com.nanri.aiimage.modules.jd.model.vo.JdProductDetailVo detail = service.detail(21L, null);
|
||||||
|
assertThat(detail.getManualLocked()).as("详情 VO 带回人工锁").isEqualTo(1);
|
||||||
|
|
||||||
|
JdProductEntity listRow = product(22L);
|
||||||
|
listRow.setManualLocked(1);
|
||||||
|
when(jdProductMapper.selectList(any())).thenReturn(List.of(listRow));
|
||||||
|
when(jdProductMapper.selectCount(any())).thenReturn(1L);
|
||||||
|
JdProductPageVo page = service.pageForUser(7L, null, 1L, 20L);
|
||||||
|
assertThat(page.getItems().get(0).getManualLocked()).as("列表 VO 带回人工锁").isEqualTo(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user