forked from pxqbzjk5c/ECMS
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.8 KiB
76 lines
1.8 KiB
设计图示(类图与时序图)
|
|
|
|
1. 类关系图(简化)
|
|
```mermaid
|
|
classDiagram
|
|
class DeptController
|
|
class EmployeeController
|
|
class EmployeeKpiController
|
|
class HireNumController
|
|
class SalaryLevelController
|
|
class LoginController
|
|
class CaptchaController
|
|
|
|
class IDeptService
|
|
class IEmployeeService
|
|
class IEmployeeKpiService
|
|
class IHireNumService
|
|
class ISalaryLevelService
|
|
|
|
class Dept
|
|
class Employee
|
|
class EmployeeKpi
|
|
class HireNum
|
|
class SalaryLevel
|
|
|
|
DeptController --> IDeptService
|
|
EmployeeController --> IEmployeeService
|
|
EmployeeKpiController --> IEmployeeKpiService
|
|
HireNumController --> IHireNumService
|
|
SalaryLevelController --> ISalaryLevelService
|
|
|
|
IDeptService --> Dept
|
|
IEmployeeService --> Employee
|
|
IEmployeeKpiService --> EmployeeKpi
|
|
IHireNumService --> HireNum
|
|
ISalaryLevelService --> SalaryLevel
|
|
```
|
|
|
|
2. 登录时序图
|
|
```mermaid
|
|
sequenceDiagram
|
|
participant U as User
|
|
participant FE as Frontend(Vue)
|
|
participant BE as Backend(Spring Boot)
|
|
participant REDIS as Redis
|
|
|
|
U->>FE: 打开登录页
|
|
FE->>BE: GET /captchaImage
|
|
BE->>REDIS: 保存(uuid -> code)
|
|
BE-->>FE: uuid, img(Base64)
|
|
U->>FE: 输入 username/password/code
|
|
FE->>BE: POST /login {username,password,code,uuid}
|
|
BE->>REDIS: 校验 code
|
|
BE-->>FE: token
|
|
FE->>FE: 保存 Admin-Token(Cookie)
|
|
```
|
|
|
|
3. 分页查询时序图
|
|
```mermaid
|
|
sequenceDiagram
|
|
participant FE as Frontend
|
|
participant CTRL as Controller
|
|
participant SVC as Service
|
|
participant DAO as Mapper/Repo
|
|
|
|
FE->>CTRL: GET /<module>/list?query
|
|
CTRL->>CTRL: startPage()
|
|
CTRL->>SVC: select*List(query)
|
|
SVC->>DAO: 查询
|
|
DAO-->>SVC: 列表数据
|
|
SVC-->>CTRL: 列表数据
|
|
CTRL-->>FE: TableDataInfo
|
|
```
|
|
|
|
|