30 lines
No EOL
786 B
Markdown
30 lines
No EOL
786 B
Markdown
```mermaid
|
|
sequenceDiagram
|
|
participant Controller
|
|
participant Service
|
|
participant Database
|
|
|
|
Controller->>Service: 결제 처리 요청
|
|
activate Service
|
|
Service->>Database: DB 작업 수행
|
|
activate Database
|
|
Database-->>Service: 결과
|
|
deactivate Database
|
|
Service-->>Controller: 결제 결과 반환
|
|
deactivate Service
|
|
|
|
Note over Controller: 외부 실패 및 DB 실패 처리
|
|
alt 외부 실패
|
|
Controller->>Service: 외부 결제 서비스 실패
|
|
else DB 실패
|
|
Service->>Database: DB 처리 실패
|
|
end
|
|
|
|
Note over Controller: 최종 커밋/롤백 경계
|
|
activate Database
|
|
opt Commit
|
|
Database-->>Service: 커밋 성공
|
|
else Rollback
|
|
Database-->>Service: 롤백 수행
|
|
end
|
|
``` |