From 39b74c6fb4a50bed412bbebdd38440d384f47733 Mon Sep 17 00:00:00 2001
From: whycxzp <glperry@163.com>
Date: 星期日, 30 三月 2025 14:40:18 +0800
Subject: [PATCH] 完善温度告警

---
 src/main/resources/mapper/CommonMapper.xml |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/main/resources/mapper/CommonMapper.xml b/src/main/resources/mapper/CommonMapper.xml
index 03e827e..ee5558e 100644
--- a/src/main/resources/mapper/CommonMapper.xml
+++ b/src/main/resources/mapper/CommonMapper.xml
@@ -164,11 +164,13 @@
     <select id="getMaxValue" resultType="java.lang.Object">
         select max(${field}) from ${schema}.${table}
     </select>
-    <select id="existTable" resultType="java.lang.String">
-        select distinct table_name
-        from INFORMATION_SCHEMA.TABLES
-        where table_name = #{tableName}
-        and TABLE_SCHEMA = #{dbName}
+    <select id="existTable" resultType="java.lang.Boolean">
+        SELECT EXISTS (
+        SELECT 1
+        FROM INFORMATION_SCHEMA.TABLES
+        WHERE table_name = #{tableName}
+        AND TABLE_SCHEMA = #{dbName}
+        ) AS table_exists
     </select>
     <select id="getTableListLike" resultType="java.lang.String">
             select distinct table_name

--
Gitblit v1.9.1