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 @@ - - - - - - - + \ 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):