From cb28ac35685c499b7aef549a5d6e07b0cb885a46 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期五, 29 十一月 2024 16:30:17 +0800
Subject: [PATCH] 1

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

diff --git a/src/main/resources/mapper/QxshMapper.xml b/src/main/resources/mapper/QxshMapper.xml
index 2acb0c1..feb23c2 100644
--- a/src/main/resources/mapper/QxshMapper.xml
+++ b/src/main/resources/mapper/QxshMapper.xml
@@ -30,7 +30,7 @@
         with rs as (
             select id, name, lon, lat, format(value, 2) "value", time
             from yssh_gcsj
-            where time between #{start} and #{end} and name like 'AI-%'
+            where time between '${start}' and '${end}' and name like 'AI-%'
         )
         select id, name, lon, lat, value, time from rs
         order by value desc
@@ -51,7 +51,7 @@
     <select id="selectWarnByBeginAndEnd" resultType="com.yssh.entity.Qxsh">
         select id, name, lon, lat, format(value, 2) "value", time
         from yssh_gcsj
-        where time between #{start} and #{end} and name like 'AI-%'
+        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)
         order by time desc, name;
     </select>
@@ -59,7 +59,7 @@
     <select id="selectAlarmByBeginAndEnd" resultType="com.yssh.entity.Qxsh">
         select id, name, lon, lat, format(value, 2) "value", time
         from yssh_gcsj
-        where time between #{start} and #{end} and name like 'AI-%'
+        where time between '${start}' and '${end}' and name like 'AI-%'
             and value > (select jcbj from alert_config limit 1)
         order by time desc, name;
     </select>
@@ -68,14 +68,14 @@
         with rs as (select jcyj, jcbj from alert_config limit 1)
         select count(id)
         from yssh_gcsj
-        where time between #{start} and #{end} and name like 'AI-%'
+        where time between '${start}' and '${end}' and name like 'AI-%'
             and value > (select jcyj from rs) and value &lt;= (select jcbj from rs);
     </select>
 
     <select id="countMonthForAlarm" resultType="java.lang.Integer">
         select count(id)
         from yssh_gcsj
-        where time between #{start} and #{end} and name like 'AI-%'
+        where time between '${start}' and '${end}' and name like 'AI-%'
             and value > (select jcbj from alert_config limit 1);
     </select>
 
@@ -83,7 +83,7 @@
         with rs as (
             select left(time, 8) "createTime"
             from yssh_gcsj
-            where time between #{start} and #{end} and name like 'AI-%'
+            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)
         )
         select createTime, count(*) "num" from rs group by createTime order by createTime;
@@ -93,7 +93,7 @@
         with rs as (
             select left(time, 8) "createTime"
             from yssh_gcsj
-            where time between #{start} and #{end} and name like 'AI-%'
+            where time between '${start}' and '${end}' and name like 'AI-%'
                 and value > (select jcbj from alert_config limit 1)
         )
         select createTime, count(*) "num" from rs group by createTime order by createTime;
@@ -111,7 +111,7 @@
     <select id="select3Hours" resultType="com.yssh.entity.Qxsh">
         select id, name, lon, lat, format(value, 2) "value", time
         from yssh_gcsj
-        where time between #{start} and #{end}
+        where time between '${start}' and '${end}'
             and value > (select jcyj from alert_config limit 1) and name like 'AI-%'
         order by time, name;
     </select>
@@ -119,7 +119,7 @@
     <select id="selectForReport" resultType="com.yssh.entity.Qxsh">
         select id, name, format(value, 2) "value", time
         from yssh_gcsj
-        where time between #{start} and #{end}
+        where time between '${start}' and '${end}'
             and value > (select jcbj from alert_config limit 1) and name like 'AI-%'
         order by time, name;
     </select>
@@ -139,7 +139,7 @@
     </select>
 
     <select id="countGcsjByTime" resultType="java.lang.Integer">
-        select count(id) from yssh_gcsj where time between #{start} and #{end};
+        select count(id) from yssh_gcsj where time between '${start}' and '${end}';
     </select>
 
     <select id="countQxshByTime" resultType="java.lang.Integer">

--
Gitblit v1.9.3