From 093a6b0549f5f1ed921d7bc4cfb5d43619c148ae Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期四, 27 七月 2023 15:39:05 +0800
Subject: [PATCH] 1

---
 src/main/resources/mapper/QxshMapper.xml |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/QxshMapper.xml b/src/main/resources/mapper/QxshMapper.xml
index 670457d..a06cae3 100644
--- a/src/main/resources/mapper/QxshMapper.xml
+++ b/src/main/resources/mapper/QxshMapper.xml
@@ -65,10 +65,11 @@
     </select>
 
     <select id="countMonthForWarn" resultType="java.lang.Integer">
+        with rs as (select jcyj, jcbj from alert_config limit 1)
         select count(*)
         from yssh_gcsj
         where time between #{start} and #{end} and name like 'AI-%'
-            and value > (select jcyj from alert_config limit 1) and value &lt;= (select jcbj from alert_config limit 1);
+            and value > (select jcyj from rs) and value &lt;= (select jcbj from rs);
     </select>
 
     <select id="countMonthForAlarm" resultType="java.lang.Integer">

--
Gitblit v1.9.3