24 lines
1000 B
Plaintext
24 lines
1000 B
Plaintext
|
|
sequenceDiagram
|
||
|
|
participant A as 坐席(王丽)
|
||
|
|
participant AG as /api/quick-replies
|
||
|
|
participant U as 管理员(宋献)
|
||
|
|
participant ADM as /api/admin/quick-replies
|
||
|
|
participant DB as PostgreSQL
|
||
|
|
|
||
|
|
A->>AG: POST /api/quick-replies (创建模板, status=draft)
|
||
|
|
A->>AG: PUT /api/quick-replies/{id} (提交审核, status→pending_review)
|
||
|
|
AG->>DB: UPDATE QuickReplyTemplate SET status='pending_review', submitted_by='wang_li'
|
||
|
|
|
||
|
|
U->>ADM: GET /api/admin/quick-replies/pending
|
||
|
|
ADM->>DB: SELECT WHERE status='pending_review'
|
||
|
|
DB-->>ADM: 待审核列表
|
||
|
|
ADM-->>U: 显示待审核模板
|
||
|
|
|
||
|
|
U->>ADM: PUT /api/admin/quick-replies/{id}/review (action=approve)
|
||
|
|
ADM->>DB: UPDATE SET status='approved', version=version+1
|
||
|
|
DB-->>ADM: 更新成功
|
||
|
|
|
||
|
|
A->>AG: GET /api/quick-replies (获取可见模板)
|
||
|
|
AG->>DB: SELECT WHERE status='approved' OR (status='pending_review' AND submitted_by=自己)
|
||
|
|
DB-->>AG: 全员可见(approved) + 仅自己(pending_review)
|