From 656052850bb36fc3b3a133421418ee22f24d8cbd Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期一, 09 一月 2023 16:08:21 +0800
Subject: [PATCH] fix: 批量删除案件和展示短信接收号码

---
 ycl-platform/src/main/resources/mapper/trend/TrendAnalysisMapper.xml |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ycl-platform/src/main/resources/mapper/trend/TrendAnalysisMapper.xml b/ycl-platform/src/main/resources/mapper/trend/TrendAnalysisMapper.xml
index 912a7c2..db8e345 100644
--- a/ycl-platform/src/main/resources/mapper/trend/TrendAnalysisMapper.xml
+++ b/ycl-platform/src/main/resources/mapper/trend/TrendAnalysisMapper.xml
@@ -6,18 +6,21 @@
         SELECT
         t2.id,
         t2.NAME,
-        count( 0 ) AS count
+        count( 0 ) AS count,
+        t2.longitude,
+        t2.latitude
         FROM
         ums_violations t1
         LEFT JOIN ums_video_point t2 ON t2.id = t1.video_point_id
         LEFT JOIN ums_video_alarm_report t3 ON t3.id = t1.video_alarm_report_id
         <where>
-            <if test="tap.startTime!=null and tap.startTime!=''and tap.endTime!=null and tap.endTime!=''" >
+            <if test="tap.startTime!=null and tap.startTime!=''and tap.endTime!=null and tap.endTime!=''">
                 t3.alarm_time between #{tap.startTime} and #{tap.endTime}
+            </if>
+            and t1.video_point_id IS NOT NULL
         </where>
         GROUP BY
         t1.video_point_id
-        ORDER BY
         count DESC
     </select>
 
@@ -31,6 +34,7 @@
             <if test="longitude='' and longitude =null and latitude='' and latitude=null">
                 t2.longitude=#{longitude} and t2.latitude=#{latitude}
             </if>
+         and   t1.video_point_id IS NOT NULL
         </where>
         GROUP BY
         t1.video_point_id,DATE_FORMAT(t3.alarm_time,"%Y-%m-%d")

--
Gitblit v1.8.0