From ceb66c0a1dcfcfdd7c331d104f66be9e033ac902 Mon Sep 17 00:00:00 2001
From: liuhaonan <konodioda2333@vip.qq.com>
Date: 星期一, 21 三月 2022 16:47:15 +0800
Subject: [PATCH] bug修复
---
dao/src/main/resources/mapper/LightReportDataMapper.xml | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dao/src/main/resources/mapper/LightReportDataMapper.xml b/dao/src/main/resources/mapper/LightReportDataMapper.xml
index 649f93f..b1456bd 100644
--- a/dao/src/main/resources/mapper/LightReportDataMapper.xml
+++ b/dao/src/main/resources/mapper/LightReportDataMapper.xml
@@ -51,15 +51,18 @@
light_report_data t1
LEFT JOIN pole t2 USING ( device_code )
<where>
+ 1 = 1
+
+ <if test="deviceCode != null and deviceCode != ''">
+ AND t1.device_code = #{deviceCode}
+ </if>
<if test="keyword != null and keyword != ''">
AND (
t1.device_code LIKE CONCAT('%', #{keyword},'%')
OR t2.pole_name LIKE CONCAT('%', #{keyword},'%')
)
</if>
- <if test="deviceCode != null and keyword != ''">
- AND t1.device_code = #{deviceCode}
- </if>
+
</where>
ORDER BY t1.light_report_data_id DESC
</select>
--
Gitblit v1.9.3