From d730e2a289b38356e28a04b35a0cb2e7b4c6c282 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期四, 03 七月 2025 10:27:56 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWeatherLastMapper.xml |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWeatherLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWeatherLastMapper.xml
index 9be0f00..157e5a8 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWeatherLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmWeatherLastMapper.xml
@@ -21,6 +21,13 @@
     id, last_history_id, weather_id, dt, air_temperature, air_humidity, ultraviolet, 
     light_intensity, rainfall, wind_speed, wind_direction
   </sql>
+  <sql id="Base_Column_List_with_alias">
+    <!--@mbg.generated-->
+    ${alias}.id, ${alias}.last_history_id, ${alias}.weather_id, ${alias}.dt, ${alias}.air_temperature,
+    ${alias}.air_humidity, ${alias}.ultraviolet, ${alias}.light_intensity,
+    ${alias}.rainfall, ${alias}.wind_speed, ${alias}.wind_direction
+  </sql>
+
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
     select 
@@ -60,7 +67,7 @@
       <if test = "name != null and name !=''">
         AND mtb.name LIKE CONCAT('%',#{name},'%')
       </if>
-      <if test = "timeStart != null and timeStop != null">
+      <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''">
         AND ltb.dt BETWEEN #{timeStart} AND #{timeStop}
       </if>
     </where>
@@ -69,7 +76,9 @@
   <!--鏍规嵁鎸囧畾鏉′欢鏌ヨ璁板綍-->
   <select id="selectSome" resultType="com.dy.pipIrrGlobal.voRm.VoWeather">
     SELECT
-    <include refid="Base_Column_List" />,
+    <include refid="Base_Column_List_with_alias" >
+      <property name="alias" value="ltb"/>
+    </include>,
     mtb.`name` AS weatherName
     FROM rm_weather_last ltb
     INNER JOIN pr_st_weather mtb ON mtb.id = ltb.weather_id
@@ -83,7 +92,7 @@
       <if test = "name != null and name !=''">
         AND mtb.name LIKE CONCAT('%',#{name},'%')
       </if>
-      <if test = "timeStart != null and timeStop != null">
+      <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''">
         AND ltb.dt BETWEEN #{timeStart} AND #{timeStop}
       </if>
     </where>

--
Gitblit v1.8.0