From cb7d99d810f2356096b67fbccd3fac556e638d83 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期四, 22 八月 2024 11:22:56 +0800
Subject: [PATCH] feat:查询条件优化
---
ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
index ed1861a..572000a 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
@@ -89,17 +89,21 @@
yu.unit_name,
yp.start_time,
yp.end_time,
- yp.province_tag,
- yp.important_tag,
- yp.important_command_image_tag
+ CASE WHEN yp.province_tag = 0 THEN '' ELSE '鐪佸巺鐐逛綅' END AS provinceTagString,
+ CASE WHEN yp.important_tag = 0 THEN '' ELSE '閲嶇偣鐐逛綅' END AS importantTagString,
+ CASE WHEN yp.important_command_image_tag = 0 THEN '' ELSE '閲嶇偣鎸囨尌鍥惧儚' END AS importantCommandImageTagString
FROM
t_yw_point yp
INNER JOIN t_monitor m ON yp.serial_number = m.serial_number
- INNER JOIN t_yw_unit yu ON yu.id = yp.unit_id
+ LEFT JOIN t_yw_unit yu ON yu.id = yp.unit_id
<where>
<if test="query.pointName != null and query.pointName != ''">
AND m.name like concat('%', #{query.pointName} ,'%')
</if>
</where>
</select>
+
+ <delete id="deleteAll">
+ delete from t_yw_point
+ </delete>
</mapper>
--
Gitblit v1.8.0