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>