55 lines
2.5 KiB
Markdown
55 lines
2.5 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Device Batch Realname Policy Configuration
|
|
|
|
The device management list SHALL provide a `批量修改实名顺序` action for selected devices. The action SHALL submit the selected device IDs and exactly one realname policy to `POST /api/admin/devices/batch-update-realname-policy`.
|
|
|
|
#### Scenario: Open batch realname policy dialog for selected devices
|
|
|
|
- **GIVEN** 用户在设备列表勾选了一台或多台设备
|
|
- **WHEN** 用户点击“批量修改实名顺序”
|
|
- **THEN** 页面 MUST open a dialog that displays the selected device count
|
|
- **AND** 页面 MUST provide mutually exclusive options `无需实名`、`先实名后购买` 和 `先购买后实名`
|
|
- **AND** 页面 MUST display `实际H5流程由设备策略决定` 提示
|
|
|
|
#### Scenario: Submit selected device policy
|
|
|
|
- **GIVEN** 用户已选择一项实名认证策略
|
|
- **WHEN** 用户确认批量修改
|
|
- **THEN** 系统 MUST call `POST /api/admin/devices/batch-update-realname-policy`
|
|
- **AND** 请求 MUST contain the selected device IDs as `asset_ids`
|
|
- **AND** 请求 MUST contain the selected `realname_policy` as `none`、`before_order` 或 `after_order`
|
|
|
|
#### Scenario: Refresh devices after all-or-nothing success
|
|
|
|
- **WHEN** 设备批量实名认证策略接口成功返回
|
|
- **THEN** 页面 MUST close the dialog
|
|
- **AND** 页面 MUST refresh the current device list
|
|
|
|
#### Scenario: Show failed batch update reason
|
|
|
|
- **WHEN** 设备批量实名认证策略接口返回业务失败或请求失败
|
|
- **THEN** 页面 MUST display the backend business reason when provided
|
|
- **AND** 页面 MUST NOT refresh the list as a partial-success result
|
|
|
|
### Requirement: Device Batch Realname Policy Limit
|
|
|
|
The device management list MUST limit each realname policy batch submission to 500 selected devices.
|
|
|
|
#### Scenario: Prevent device batch submission over the limit
|
|
|
|
- **GIVEN** 用户在设备列表选择超过 500 台设备
|
|
- **WHEN** 用户尝试确认批量修改实名认证策略
|
|
- **THEN** 页面 MUST prevent the request from being sent
|
|
- **AND** 页面 MUST display an explicit maximum-500-items error
|
|
|
|
### Requirement: Device Batch Policy Is User Selected
|
|
|
|
The device management list MUST submit the policy explicitly selected by the user and MUST NOT infer, override, or transform it from asset type, card type, or other asset fields.
|
|
|
|
#### Scenario: Preserve selected device policy value
|
|
|
|
- **GIVEN** 用户在批量配置弹框选择任一实名认证策略
|
|
- **WHEN** 用户确认提交
|
|
- **THEN** 请求中的 `realname_policy` MUST equal the selected option
|