48 lines
2.4 KiB
Markdown
48 lines
2.4 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Agent Cash Available Low Balance Warning
|
|
|
|
The agent fund overview SHALL display cash balance data and a fixed-threshold low balance warning using the backend-provided `low_balance_warning` flag from `GET /api/admin/shops/fund-summary`. The frontend MUST NOT calculate the threshold itself and MUST NOT expose any threshold configuration input.
|
|
|
|
#### Scenario: Display normal balance state above threshold
|
|
|
|
- **GIVEN** 用户进入代理资金概况页面
|
|
- **WHEN** `GET /api/admin/shops/fund-summary` 返回 `balance`、`frozen_balance`、`cash_available`
|
|
- **AND** `low_balance_warning=false`
|
|
- **THEN** 页面 MUST 展示现金余额和冻结金额
|
|
- **AND** 所有金额 MUST 按分转元展示
|
|
- **AND** 页面 MUST NOT 展示“现金余额不足100元”红色状态
|
|
|
|
#### Scenario: Display warning state at or below threshold
|
|
|
|
- **GIVEN** 用户进入代理资金概况页面
|
|
- **WHEN** `GET /api/admin/shops/fund-summary` 返回 `low_balance_warning=true`
|
|
- **THEN** 页面 MUST 展示“现金余额不足100元”红色状态
|
|
- **AND** 该提示 MUST NOT 将信用额度计入文案
|
|
|
|
#### Scenario: Frontend does not expose threshold configuration
|
|
|
|
- **WHEN** 用户查看代理资金概况页面
|
|
- **THEN** 页面 MUST NOT 展示余额预警阈值输入框或配置控件
|
|
- **AND** 前端 MUST NOT 依据 `cash_available` 自行计算是否低于 `100` 元
|
|
|
|
### Requirement: Agent Fund Summary Low Balance Response Fields
|
|
|
|
The frontend SHALL read the low-balance display state exclusively from the `GET /api/admin/shops/fund-summary` response fields `balance:int64`, `frozen_balance:int64`, `cash_available:int64`, and `low_balance_warning:bool`.
|
|
|
|
#### Scenario: Read low balance response contract
|
|
|
|
- **WHEN** 前端请求 `GET /api/admin/shops/fund-summary`
|
|
- **THEN** 前端 MUST 读取 `balance`、`frozen_balance`、`cash_available`、`low_balance_warning`
|
|
- **AND** `low_balance_warning` MUST be the only source of truth for whether the warning is shown
|
|
|
|
### Requirement: Public Notification Features Are Out Of Scope
|
|
|
|
This change SHALL NOT add or modify top notification drawer, notification center, or any other public in-app notification feature.
|
|
|
|
#### Scenario: Deliver low balance overview without notification changes
|
|
|
|
- **WHEN** 本次变更落地
|
|
- **THEN** 代理资金概况的低余额展示 MUST be available
|
|
- **AND** 顶部通知抽屉、站内通知中心及其他公共站内通知功能 MUST NOT be changed by this proposal
|