feat: 添加货币和汇率管理功能
refactor: 重构前端路由和登录逻辑 docs: 更新业务闭环、任务和架构文档 style: 调整代码格式和文件结构 chore: 更新依赖项和配置文件
This commit is contained in:
153
docs/01_Architecture/06_State_Machine.md
Normal file
153
docs/01_Architecture/06_State_Machine.md
Normal file
@@ -0,0 +1,153 @@
|
||||
# STATE_MACHINE
|
||||
|
||||
## Merchant(商户)状态
|
||||
|
||||
pending
|
||||
→ active
|
||||
→ inactive
|
||||
→ suspended
|
||||
|
||||
---
|
||||
|
||||
## User(用户)状态
|
||||
|
||||
pending
|
||||
→ active
|
||||
→ inactive
|
||||
→ locked
|
||||
|
||||
---
|
||||
|
||||
## Store(店铺)状态
|
||||
|
||||
pending
|
||||
→ active
|
||||
→ inactive
|
||||
→ suspended
|
||||
|
||||
---
|
||||
|
||||
## Feature(功能)状态
|
||||
|
||||
inactive
|
||||
→ pending_payment
|
||||
→ active
|
||||
→ expired
|
||||
→ suspended
|
||||
|
||||
---
|
||||
|
||||
## Order(订单)状态
|
||||
|
||||
pending
|
||||
→ paid
|
||||
→ split
|
||||
→ processing
|
||||
→ shipped
|
||||
→ completed
|
||||
→ refunded
|
||||
→ cancelled
|
||||
|
||||
---
|
||||
|
||||
## Cross-Border E-Commerce(跨境电商)状态
|
||||
|
||||
PENDING
|
||||
→ PROCESSING
|
||||
→ CLEARANCE
|
||||
→ SHIPPING
|
||||
→ DELIVERED
|
||||
|
||||
---
|
||||
|
||||
## SubOrder(子订单)状态
|
||||
|
||||
pending
|
||||
→ processing
|
||||
→ shipped
|
||||
→ completed
|
||||
→ refunded
|
||||
→ cancelled
|
||||
|
||||
---
|
||||
|
||||
## Product(商品)状态
|
||||
|
||||
draft
|
||||
→ pending_approval
|
||||
→ active
|
||||
→ inactive
|
||||
→ discontinued
|
||||
|
||||
---
|
||||
|
||||
## Inventory(库存)状态
|
||||
|
||||
normal
|
||||
→ low
|
||||
→ out_of_stock
|
||||
→ overstock
|
||||
|
||||
---
|
||||
|
||||
## Payment(支付)状态
|
||||
|
||||
created
|
||||
→ processing
|
||||
→ paid
|
||||
→ failed
|
||||
→ refunded
|
||||
|
||||
---
|
||||
|
||||
## Bill(账单)状态
|
||||
|
||||
pending
|
||||
→ confirmed
|
||||
→ settled
|
||||
→ disputed
|
||||
|
||||
---
|
||||
|
||||
## Settlement(结算)状态
|
||||
|
||||
pending
|
||||
→ processing
|
||||
→ completed
|
||||
→ failed
|
||||
|
||||
---
|
||||
|
||||
## Task(任务)状态
|
||||
|
||||
pending
|
||||
→ running
|
||||
→ success
|
||||
→ failed
|
||||
→ cancelled
|
||||
|
||||
---
|
||||
|
||||
## 状态变更原则
|
||||
|
||||
- 所有状态变更必须通过 Service
|
||||
- 禁止前端直接控制状态
|
||||
- 状态变更必须记录操作日志
|
||||
- 状态变更必须遵循预定义的流转路径
|
||||
- 状态变更可能触发相关业务逻辑(如通知、计费等)
|
||||
|
||||
---
|
||||
|
||||
## 状态变更触发条件
|
||||
|
||||
- 商户状态:审核结果、逾期未付费、违规行为
|
||||
- 用户状态:登录异常、权限变更、账号管理
|
||||
- 店铺状态:平台审核、违规行为、商户操作
|
||||
- 功能状态:支付结果、订阅到期、手动操作
|
||||
- 订单状态:支付结果、商户操作、物流状态
|
||||
- 商品状态:审核结果、库存状态、商户操作
|
||||
- 库存状态:库存数量变化、库存同步
|
||||
- 支付状态:支付渠道反馈、人工处理
|
||||
- 账单状态:系统确认、支付结果、人工处理
|
||||
- 结算状态:系统处理、支付结果、人工处理
|
||||
- 任务状态:任务触发、执行结果、人工取消
|
||||
Reference in New Issue
Block a user