Files
luo 5e15127a89
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 7m0s
feat: 接入新参数:套餐分配生效条件选择,资产详情前代后代换货标识
2026-07-23 17:06:05 +08:00

3.9 KiB

ADDED Requirements

Requirement: Series Grant Package Expiry Base Visibility

The series grant package list and package edit context SHALL display the package allocation's default expiry base, override expiry base, and effective expiry base using the Chinese name fields returned by the backend.

Scenario: Display expiry bases in series grant package list

  • GIVEN 用户进入代理系列授权套餐列表
  • WHEN 已授权套餐记录返回默认、覆盖和最终生效条件字段
  • THEN 页面 MUST display the default expiry base name, override expiry base name, and effective expiry base name for the package allocation

Scenario: Display expiry bases in package edit context

  • GIVEN 用户打开代理系列授权中已授权套餐的编辑弹框
  • WHEN 套餐分配数据加载完成
  • THEN 页面 MUST display the default expiry base name, override expiry base name, and effective expiry base name
  • AND 页面 MUST display 仅影响后续新订单,不影响已购买套餐

Requirement: Series Grant Package Expiry Base Editing

The series grant package edit context SHALL provide 跟随套餐默认, 购买即生效, and 实名激活时生效 options, then update the corresponding package allocation record through the package allocation expiry-base API.

Scenario: Edit override from series grant package list

  • GIVEN 用户正在代理系列授权套餐列表编辑已授权套餐
  • WHEN 用户选择生效条件并保存
  • THEN 系统 MUST use the corresponding package allocation record ID to call PATCH /api/admin/shop-package-allocations/{id}/expiry-base
  • AND 选择“跟随套餐默认”时请求 MUST explicitly contain expiry_base_override: null

Requirement: Series Grant Creation Expiry Base Contract

The series grant creation and package addition flows SHALL explicitly send one shared expiry_base_override for all newly created package allocations. The allowed values MUST be null, from_purchase, and from_activation.

Scenario: Create series grant with shared expiry base override

  • WHEN 前端调用 POST /api/admin/shop-series-grants
  • THEN 请求 MUST explicitly contain expiry_base_override
  • AND the selected value MUST apply to all package allocations created by the initial authorization

Scenario: Add packages to existing series grant with shared expiry base override

  • WHEN 前端调用 PUT /api/admin/shop-series-grants/{id}/packages to add packages
  • THEN 请求 MUST explicitly contain expiry_base_override
  • AND the selected value MUST apply only to the newly added package allocations
  • AND modifying or deleting existing packages MUST NOT change their historical override values

Scenario: Restore default during series grant creation or package addition

  • WHEN 用户选择“跟随套餐默认”
  • THEN 请求 MUST explicitly contain expiry_base_override: null
  • AND 请求 MUST NOT omit the field to represent the default

Requirement: Batch Package Allocation Expiry Base Contract

The batch package allocation flow SHALL apply one explicitly selected expiry_base_override to all allocations created by the batch request.

Scenario: Create batch allocations with shared expiry base

  • WHEN 前端调用 POST /api/admin/shop-package-batch-allocations
  • THEN 请求 MUST explicitly contain expiry_base_override
  • AND all returned data.allocations[] items MUST preserve the allocation ID and six expiry-base fields

Scenario: Batch allocation follows package default

  • WHEN 用户在批量分配中选择“跟随套餐默认”
  • THEN 请求 MUST explicitly contain expiry_base_override: null

Scenario: Refresh effective value after editing

  • WHEN 代理系列授权套餐的生效条件更新成功
  • THEN 页面 MUST refresh the relevant package allocation data
  • AND 页面 MUST display the latest backend returned effective expiry base name