Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
wx-notification
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 56b59af4
authored
Aug 07, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
docs: add order ownership design
1 parent
0088076f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
docs/superpowers/specs/2026-08-07-order-approval-order-ownership-design.md
docs/superpowers/specs/2026-08-07-order-approval-order-ownership-design.md
0 → 100644
View file @
56b59af
# 审核详情订单归属字段设计
## 背景
审核详情页的“订单信息”区域目前展示订单编号、订单类型、总价等字段,但没有展示订单是否属于低价单。接口详情数据已约定通过
`lowPriceFlag`
返回该信息。
## 目标
在订单类型下方新增“订单归属”字段,并按接口枚举值展示:
-
`lowPriceFlag = 0`
:普通订单
-
`lowPriceFlag = 1`
:低价订单
-
字段缺失或返回未知值:显示
`-`
## 非目标
-
不修改订单详情接口请求参数或接口地址。
-
不修改审核通过、驳回和审核日志流程。
-
不调整商品信息、页面布局样式或其他订单字段。
## 方案
沿用当前订单类型的声明式字段列表与映射表模式,为订单信息项增加通用格式映射能力:
1.
将现有订单类型配置标记为
`djOrderType`
格式。
2.
新增订单归属配置,字段键为
`lowPriceFlag`
,格式标记为
`lowPriceFlag`
,位置紧跟订单类型之后。
3.
在页面中通过格式标记选择对应的映射表,统一处理
`0`
、
`1`
、缺失值和未知值。
4.
映射表只负责展示文案,不改变
`orderInfo`
中接口原始值。
## 数据流
接口返回详情数据后,页面现有逻辑将其保存到
`orderInfo`
。渲染
`displayOrderForm`
时,订单归属项读取
`orderInfo.lowPriceFlag`
,通过低价单映射表转换为“普通订单”或“低价订单”;没有可识别值时回退为
`-`
。
## 异常与兼容
接口不返回
`lowPriceFlag`
时页面仍正常渲染,并展示
`-`
。使用显式存在性判断,避免把合法值
`0`
当成空值。
## 验收与测试
-
页面订单类型下方出现“订单归属”。
-
`lowPriceFlag`
为
`0`
时显示“普通订单”。
-
`lowPriceFlag`
为
`1`
时显示“低价订单”。
-
字段缺失、为
`null`
或为未知枚举值时显示
`-`
。
-
现有项目构建或检查命令通过,且原有订单类型展示不回归。
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment