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

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

diff --git a/src/main/resources/mapper/QxshMapper.xml b/src/main/resources/mapper/QxshMapper.xml
index feb23c2..d273df4 100644
--- a/src/main/resources/mapper/QxshMapper.xml
+++ b/src/main/resources/mapper/QxshMapper.xml
@@ -1,10 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yssh.mapper.QxshMapper">
+    <!-- where name = #{name} and Cast(time as signed) between ${start} and ${end} -->
     <select id="getNewMonitorData" resultType="com.yssh.entity.SuYuanMonitorData">
 		select id, format(value, 2) "value", time
 		from yssh_qxsh
-		where name = #{name} and Cast(time as signed) between ${start} and ${end}
+		where name = #{name} and time between '${start}' and '${end}'
 		order by time desc;
 	</select>
 
@@ -127,14 +128,14 @@
     <select id="selectLastYearVal" resultType="java.lang.Double">
          select format(value, 2) "value"
          from yssh_gcsj
-         where time = #{time} and name = #{name}
+         where time = '${time}' and name = #{name}
          limit 1;
     </select>
 
     <select id="selectByTimeAndName" resultType="com.yssh.entity.Qxsh">
         select id, name, lon, lat, format(value, 2) "value", time
         from yssh_gcsj
-        where time = #{time} and name = #{name}
+        where time = '${time}' and name = #{name}
         limit 1;
     </select>
 

--
Gitblit v1.9.3