Files
sexygoat 1990a3ccba
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m4s
fix: bug
2026-05-11 15:51:50 +08:00

3.2 KiB

ADDED Requirements

Requirement: IoT Card Batch Series Binding Selection Contract

The system SHALL expose PATCH /api/admin/iot-cards/series-binding using the same batch target-selection pattern as standalone card batch allocation and recall.

The request MUST include series_id. The request MAY omit selection_type only for backward compatibility, and in that case the system MUST treat the request as selection_type=list.

When selection_type=list, the request MUST use iccids to identify the target cards and MUST support up to 1000 ICCIDs.

When selection_type=range, the request MUST use iccid_start and iccid_end to identify the target ICCID range.

When selection_type=filter, the request MUST support the same primary filter dimensions used by standalone card batch allocation and recall, including carrier_id, status, and batch_no.

series_id=0 MUST mean clearing the current series binding instead of binding a new series.

Scenario: Bind card series by ICCID list

  • GIVEN 用户已经明确选中了多张单卡
  • WHEN 系统调用 PATCH /api/admin/iot-cards/series-binding
  • AND 请求体包含 selection_type="list"series_id=12iccids=["8986000000000000001","8986000000000000002"]
  • THEN 系统 MUST 按 iccids 对这批卡设置目标套餐系列绑定

Scenario: Bind card series by ICCID range

  • GIVEN 用户希望按 ICCID 号段批量设置套餐系列
  • WHEN 系统调用 PATCH /api/admin/iot-cards/series-binding
  • AND 请求体包含 selection_type="range"series_id=12iccid_start="8986000000000000001"iccid_end="8986000000000000100"
  • THEN 系统 MUST 按 ICCID 范围选出目标卡并设置套餐系列绑定

Scenario: Clear card series binding by standalone-card filters

  • GIVEN 用户希望对满足单卡筛选条件的全部卡清除当前套餐系列关联
  • WHEN 系统调用 PATCH /api/admin/iot-cards/series-binding
  • AND 请求体包含 selection_type="filter"series_id=0carrier_id=1status=1
  • THEN 系统 MUST 对完整筛选结果集执行清除操作
  • AND 系统 MUST NOT 只处理当前分页内已渲染的卡

Scenario: Omitted selection type remains compatible with legacy callers

  • GIVEN 旧版调用方只提交 iccidsseries_id
  • WHEN 系统调用 PATCH /api/admin/iot-cards/series-binding
  • AND 请求体包含 iccids=["8986000000000000001"]series_id=8
  • THEN 系统 MUST 将该请求视为 selection_type="list"
  • AND 系统 MUST 继续按 iccids 处理目标卡

Requirement: IoT Card Batch Series Binding Result Summary

The system SHALL return a batch processing summary for IoT card series binding requests.

The result data MUST include success_count, fail_count, and failed_items. Each entry in failed_items MUST include iccid and reason.

Scenario: Partial card binding failure returns itemized reasons

  • GIVEN 某次单卡批量套餐系列绑定同时存在成功项和失败项
  • WHEN 接口返回处理结果
  • THEN 响应数据 MUST 包含成功数量和失败数量
  • AND 每条失败明细 MUST 返回对应的 iccid
  • AND 每条失败明细 MUST 返回可展示的失败原因 reason