4.1 KiB
4.1 KiB
ADDED Requirements
Requirement: Admin Asset Card Sync Timestamp Display
The admin asset information view SHALL display realtime sync timestamps for card assets within the card information section.
Scenario: Show card sync timestamps on card asset page
- GIVEN 用户正在查看后台“资产信息”中的卡资产详情
- AND
GET /api/admin/assets/:identifier/realtime-status或POST /api/admin/assets/:identifier/refresh返回了卡资产实时数据 - WHEN 页面渲染“卡信息”区域或完成实时刷新后的状态更新
- THEN 页面 MUST 显示
实名同步时间,并映射last_real_name_check_at - AND 页面 MUST 显示
卡状态同步时间,并映射last_card_status_check_at - AND 页面 MUST 显示
流量同步时间,并映射last_data_check_at - AND 这三个字段的时间格式 MUST 与页面其他时间字段保持一致
Scenario: Card sync timestamps show placeholders when unavailable
- GIVEN 用户正在查看后台“资产信息”中的卡资产详情
- WHEN 任一同步时间字段为
null、空字符串或接口未返回对应值 - THEN 页面 MUST 保留对应字段标签
- AND 页面 MUST 为该字段显示稳定的占位内容
Requirement: Admin Device Realtime Sync Timestamp Display
The admin asset information view SHALL display device realtime sync timestamps from top-level realtime response fields within the device realtime information section for device assets.
Scenario: Show device realtime sync timestamps in device realtime information
- GIVEN 用户正在查看后台“资产信息”中的设备资产详情
- AND
GET /api/admin/assets/:identifier/realtime-status或POST /api/admin/assets/:identifier/refresh返回了设备资产实时数据 - WHEN 页面渲染“设备实时信息”区域或完成实时刷新后的状态更新
- THEN 页面 MUST 显示
实名同步时间,并映射顶层last_real_name_check_at - AND 页面 MUST 显示
卡状态同步时间,并映射顶层last_card_status_check_at - AND 页面 MUST 显示
流量同步时间,并映射顶层last_data_check_at - AND 页面 MUST NOT 要求这三个字段必须存在于
device_realtime中才可展示
Scenario: Device realtime section keeps stable placeholders when top-level timestamps are empty
- GIVEN 用户正在查看后台“资产信息”中的设备资产详情
- WHEN 顶层
last_real_name_check_at、last_card_status_check_at、last_data_check_at中任一字段为空 - THEN 页面 MUST 保留
实名同步时间、卡状态同步时间、流量同步时间这三个字段标签 - AND 页面 MUST 为缺失值显示稳定的占位内容
Requirement: Admin Asset Realtime Sync Timestamp Contract Compatibility
The admin asset information integration SHALL accept and preserve additive sync timestamp fields from realtime responses for card assets and device bound cards.
Scenario: Card realtime contract accepts additive sync timestamp fields
- GIVEN
GET /api/admin/assets/:identifier/realtime-status或POST /api/admin/assets/:identifier/refresh返回卡资产实时数据 - WHEN 前端解析实时状态响应
- THEN 前端类型契约 MUST 支持顶层
last_data_check_at - AND 前端类型契约 MUST 支持顶层
last_real_name_check_at - AND 前端类型契约 MUST 支持顶层
last_card_status_check_at
Scenario: Device bound-card merge preserves sync timestamp fields
- GIVEN
GET /api/admin/assets/:identifier/realtime-status或POST /api/admin/assets/:identifier/refresh返回设备资产实时数据 - AND
cards列表中的绑定卡记录包含last_data_check_at、last_real_name_check_at、last_card_status_check_at - WHEN 前端将实时绑定卡数据与已有设备绑定卡状态合并
- THEN 每条绑定卡记录 MUST 保留各自的三个同步时间字段
- AND 绑定卡同步时间字段 MAY 被其他设备卡展示或后续状态使用
- AND 合并过程 MUST NOT 因刷新而无故丢失已返回的同步时间值