From 18108a94f48b2cd6f9fce59aa5ed1d1ccc3f27b2 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期三, 18 六月 2025 17:34:44 +0800
Subject: [PATCH] 1. 系统日志修复关闭连接 2. 删除之前模仿台达的数据库管理类 3. 重做配方主界面 4. 配方管理类添加更新PPID和描述的函数
---
SourceCode/Bond/Servo/SystemLogManager.cpp | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/SourceCode/Bond/Servo/SystemLogManager.cpp b/SourceCode/Bond/Servo/SystemLogManager.cpp
index 7289fb6..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);
@@ -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