From 591b785cf76754a696b5b07eab07cf587f2a4449 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期日, 24 四月 2022 11:33:21 +0800
Subject: [PATCH] fix
---
dao/src/main/resources/mapper/MonitorMapper.xml | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/dao/src/main/resources/mapper/MonitorMapper.xml b/dao/src/main/resources/mapper/MonitorMapper.xml
index af913d0..4131ba5 100644
--- a/dao/src/main/resources/mapper/MonitorMapper.xml
+++ b/dao/src/main/resources/mapper/MonitorMapper.xml
@@ -80,7 +80,18 @@
</where>
</select>
<select id="listMonitorDeviceSerial" resultType="java.lang.String">
- SELECT device_serial FROM monitor;
+ SELECT
+ device_serial
+ FROM
+ monitor t1
+ LEFT JOIN pole_binding t2 ON t1.device_serial = t2.device_code
+ AND t2.device_type = 7
+ LEFT JOIN pole t3 ON t3.id = t2.pole_id
+ <where>
+ <if test="userid != null">
+ AND (t3.user_id = #{userid} OR t3.client_id = #{userid})
+ </if>
+ </where>
</select>
</mapper>
--
Gitblit v1.9.3