Files
luo 830476d49d
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 5m48s
H5实名购买顺序与后台批量配置
2026-07-21 16:13:40 +08:00

2.4 KiB

ADDED Requirements

Requirement: IoT Card Batch Realname Policy Configuration

The IoT card management list SHALL provide a 批量修改实名顺序 action for selected cards. The action SHALL submit the selected card IDs and exactly one realname policy to POST /api/admin/iot-cards/batch-update-realname-policy.

Scenario: Open batch realname policy dialog for selected cards

  • GIVEN 用户在卡列表勾选了一张或多张卡
  • WHEN 用户点击“批量修改实名顺序”
  • THEN 页面 MUST open a dialog that displays the selected card count
  • AND 页面 MUST provide mutually exclusive options 无需实名先实名后购买先购买后实名

Scenario: Submit selected card policy

  • GIVEN 用户已选择一项实名认证策略
  • WHEN 用户确认批量修改
  • THEN 系统 MUST call POST /api/admin/iot-cards/batch-update-realname-policy
  • AND 请求 MUST contain the selected card IDs as asset_ids
  • AND 请求 MUST contain the selected realname_policy as nonebefore_orderafter_order

Scenario: Refresh cards after all-or-nothing success

  • WHEN 卡批量实名认证策略接口成功返回
  • THEN 页面 MUST close the dialog
  • AND 页面 MUST refresh the current card 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: IoT Card Batch Realname Policy Limit

The IoT card management list MUST limit each realname policy batch submission to 500 selected cards.

Scenario: Prevent card 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: IoT Card Batch Policy Is User Selected

The IoT card 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 card policy value

  • GIVEN 用户在批量配置弹框选择任一实名认证策略
  • WHEN 用户确认提交
  • THEN 请求中的 realname_policy MUST equal the selected option