From 0569c29b19e4d23f055845a167c706f11590fa2a Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 19 八月 2025 15:55:00 +0800
Subject: [PATCH] 1.CControlJob和CProcessJob的序列化和反序列化;

---
 SourceCode/Bond/Servo/SystemLogManager.cpp |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/SourceCode/Bond/Servo/SystemLogManager.cpp b/SourceCode/Bond/Servo/SystemLogManager.cpp
index 87a324c..a62e07e 100644
--- a/SourceCode/Bond/Servo/SystemLogManager.cpp
+++ b/SourceCode/Bond/Servo/SystemLogManager.cpp
@@ -29,7 +29,7 @@
 }
 
 // 初始化日志表
-bool SystemLogManager::initializeLogTable() {
+bool SystemLogManager::initSystemLogTable() {
     // 获取可执行文件路径
     char szPath[MAX_PATH];
     GetModuleFileName(NULL, szPath, MAX_PATH);
@@ -42,7 +42,7 @@
     }
 
     // 构造数据库路径
-    std::string dbPath = dbDir + "\\SystemLog.db";
+    std::string dbPath = dbDir + "\\SystemLogManager.db";
 
     // 连接数据库
     if (!m_pDB->connect(dbPath, true)) {
@@ -63,6 +63,15 @@
     return m_pDB->executeQuery(createTableQuery);
 }
 
+// 终止数据库连接
+void SystemLogManager::termSystemLogTable() {
+    if (!m_pDB) {
+        return;
+    }
+
+    m_pDB->disconnect();
+}
+
 // 添加日志(使用当前用户)
 bool SystemLogManager::log(LogType logType, const std::string& event) {
     if (!m_pDB) {

--
Gitblit v1.9.3