ssm商城管理系统时序图
时间: 2023-08-29 19:12:37 浏览: 80
以下是一个 SSM 商城管理系统的简单时序图,仅供参考:
1. 用户登录
```mermaid
sequenceDiagram
participant User
participant Controller
participant Service
participant DAO
User->>Controller: 请求登录
Controller->>Service: 调用登录服务
Service->>DAO: 查询用户信息
DAO-->>Service: 返回用户信息
Service-->>Controller: 返回登录结果
Controller-->>User: 返回登录结果
```
2. 商品列表展示
```mermaid
sequenceDiagram
participant User
participant Controller
participant Service
participant DAO
User->>Controller: 请求商品列表
Controller->>Service: 调用商品列表服务
Service->>DAO: 查询商品信息
DAO-->>Service: 返回商品信息
Service-->>Controller: 返回商品列表
Controller-->>User: 返回商品列表
```
3. 添加商品
```mermaid
sequenceDiagram
participant User
participant Controller
participant Service
participant DAO
User->>Controller: 请求添加商品
Controller->>Service: 调用添加商品服务
Service->>DAO: 添加商品信息
DAO-->>Service: 返回添加结果
Service-->>Controller: 返回添加结果
Controller-->>User: 返回添加结果
```
4. 修改商品
```mermaid
sequenceDiagram
participant User
participant Controller
participant Service
participant DAO
User->>Controller: 请求修改商品
Controller->>Service: 调用修改商品服务
Service->>DAO: 修改商品信息
DAO-->>Service: 返回修改结果
Service-->>Controller: 返回修改结果
Controller-->>User: 返回修改结果
```
5. 删除商品
```mermaid
sequenceDiagram
participant User
participant Controller
participant Service
participant DAO
User->>Controller: 请求删除商品
Controller->>Service: 调用删除商品服务
Service->>DAO: 删除商品信息
DAO-->>Service: 返回删除结果
Service-->>Controller: 返回删除结果
Controller-->>User: 返回删除结果
```