From 017fbf14b4b8b616a29cb5dc4cdd73a5d295a32b Mon Sep 17 00:00:00 2001
From: CJL6015 <1253368419@qq.com>
Date: Sun, 30 Nov 2025 17:44:35 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20correct=20SQL=20query=20p?=
=?UTF-8?q?arameter=20name=20in=20get=5Fmodel=5Fby=5Fid=5Fand=5Fversion=20?=
=?UTF-8?q?function?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.idea/workspace.xml | 61 +++++++++++++++++++++------------------------
PCA_Test.py | 2 +-
2 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index b237f1e..edc442a 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,14 +5,8 @@
-
-
-
-
-
-
@@ -29,9 +23,9 @@
-
+ {
+ "associatedIndex": 2
+}
@@ -53,23 +47,23 @@
- {
+ "keyToString": {
+ "Python.app.executor": "Debug",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.git.unshallow": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "git-widget-placeholder": "master",
+ "last_opened_file_path": "C:/Users/cjl60/Documents/work/alert/model-lab",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable",
+ "vue.rearranger.settings.migration": "true"
}
-}]]>
+}
@@ -870,18 +865,18 @@
file://$PROJECT_DIR$/PCA_Test.py
- 196
-
+ 270
+
file://$PROJECT_DIR$/PCA_Test.py
- 270
-
+ 290
+
file://$PROJECT_DIR$/PCA_Test.py
- 268
-
+ 198
+
@@ -894,6 +889,6 @@
-
+
\ No newline at end of file
diff --git a/PCA_Test.py b/PCA_Test.py
index fde9b82..e33f4e0 100644
--- a/PCA_Test.py
+++ b/PCA_Test.py
@@ -195,7 +195,7 @@ def get_model_by_ID(model_id, version="v-test"):
def get_model_by_id_and_version(model_id, version):
ms = MySQL(host=config._SQL_IP, user="root", pwd="powerSIS#123", database="alert")
- resList = ms.ExecQuery(f"SELECT Model_info FROM model_version where id={model_id} and version='{version}'")
+ resList = ms.ExecQuery(f"SELECT Model_info FROM model_version where model_id={model_id} and version='{version}'")
return json.loads(resList[0][0])
def pca(model, Data_origin):