Browse Source

chore: uml文件更新

TzuxinChen 2 months ago
parent
commit
9f805982de
2 changed files with 29 additions and 66 deletions
  1. 28 64
      uml/api-service-class.plantuml
  2. 1 2
      uml/processor.plantuml

+ 28 - 64
uml/api-service-class.plantuml

@@ -1,75 +1,39 @@
 @startuml
-title 数据集成服务类图
+skinparam style strictuml
 
-' 数据获取器
-class ApiDataFetcher {
-  - apiEndpoint: String
-  + fetchApiData(String url)
-  + configureApiEndpoint(String endpoint)
-}
-class KafkaDataFetcher {
-  - kafkaBroker: String
-  - groupId: String
-  + fetchKafkaData(String topic)
-  + configureKafka(String broker, String groupId)
-}
-
-' 抽象处理器
-abstract class Handler {
-  - dataFetcher: DataFetcher
-  - dataCache: List<DataModel>
-  + fetchData(): List<DataModel>
-  + processData(List<DataModel> data): void
-  + validateData(DataModel data): boolean
+class UserController {
+  +getUser(userId: Long): User
+  +createUser(user: User): User
+  +updateUser(userId: Long, user: User): User
+  +deleteUser(userId: Long): void
 }
 
-' 具体处理器
-class AwarenessHandler
-class NetworkHandler
-class DcimHandler
-class CloudHandler
-class MonitoringHandler
-class CDOSHandler
-
-' 数据集成服务
-class IntegrationService {
-  - handlers: List<Handler>
-  + DataIntegrate()
-  + registerHandler(Handler handler): void
-  + scheduleIntegration(): void
-  + generateReport(): String
+class UserService {
+  +findUserById(userId: Long): User
+  +saveUser(user: User): User
+  +updateUser(userId: Long, user: User): User
+  +removeUser(userId: Long): void
 }
 
-' 数据库服务
-class DatabaseService {
-  + saveData(data: List<DataModel>)
-  + queryData(String condition): List<DataModel>
-  + deleteData(String condition): void
-  + updateData(DataModel newData): void
+class UserRepository {
+  +findById(userId: Long): User
+  +save(user: User): User
+  +deleteById(userId: Long): void
 }
 
-' 数据模型
-class DataModel {
-  + id: int
-  + name: String
-  + value: String
-  + timestamp: String
-  + source: String
+class User {
+  -id: Long
+  -name: String
+  -email: String
+  +getId(): Long
+  +setId(id: Long): void
+  +getName(): String
+  +setName(name: String): void
+  +getEmail(): String
+  +setEmail(email: String): void
 }
 
-' 继承关系
-Handler <|-- AwarenessHandler
-Handler <|-- NetworkHandler
-Handler <|-- DcimHandler
-Handler <|-- CloudHandler
-Handler <|-- MonitoringHandler
-Handler <|-- CDOSHandler
-
-' 依赖关系
-Handler --> ApiDataFetcher : uses
-Handler --> KafkaDataFetcher : uses
-IntegrationService --> Handler : uses
-IntegrationService --> DatabaseService : stores
-DatabaseService --> DataModel : saves
-
+UserController --> UserService
+UserService --> UserRepository
+UserRepository --> User
 @enduml

+ 1 - 2
uml/processor.plantuml

@@ -19,8 +19,7 @@ fork again
     :网管平台数据集成;
 fork again
     :IT综合监控数据集成;
-fork again
-    :CDOS数据集成;
+
 end fork
 
 :数据存储阶段;