From 2788764430bd7bf70362873be2349f65876744e1 Mon Sep 17 00:00:00 2001 From: wxy001 Date: Tue, 24 May 2022 19:20:54 +0800 Subject: [PATCH] =?UTF-8?q?2022=E5=B9=B45=E6=9C=8824=E6=97=A519:20:31=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2=E8=AE=BE=E5=A4=87=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=92=8C=E6=A3=80=E6=B5=8B=E6=95=B0=E6=8D=AE=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- springboot/wumei-admin/src/main/resources/application.yml | 4 ++-- .../iot/tdengine/service/impl/TdengineLogServiceImpl.java | 3 +++ .../src/main/resources/mapper/tdengine/TDDeviceLogMapper.xml | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/springboot/wumei-admin/src/main/resources/application.yml b/springboot/wumei-admin/src/main/resources/application.yml index 60297c88..6366ca42 100644 --- a/springboot/wumei-admin/src/main/resources/application.yml +++ b/springboot/wumei-admin/src/main/resources/application.yml @@ -43,7 +43,7 @@ spring: # 国际化资源文件路径 basename: i18n/messages profiles: - active: druid + active: dev # 文件上传 servlet: multipart: @@ -65,7 +65,7 @@ spring: # 数据库索引 database: 0 # 密码 - password: wumei-smart + password: # 连接超时时间 timeout: 10s lettuce: diff --git a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/service/impl/TdengineLogServiceImpl.java b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/service/impl/TdengineLogServiceImpl.java index 01322450..9632d61d 100644 --- a/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/service/impl/TdengineLogServiceImpl.java +++ b/springboot/wumei-iot/src/main/java/com/ruoyi/iot/tdengine/service/impl/TdengineLogServiceImpl.java @@ -49,6 +49,9 @@ public class TdengineLogServiceImpl implements ILogService { @Override public List selectMonitorList(DeviceLog deviceLog) { + if(deviceLog.getIdentity()!=null){ + deviceLog.setIdentity("%"+deviceLog.getIdentity()+"%"); + } return tdDeviceLogDAO.selectMonitorList(dbName,deviceLog); } } diff --git a/springboot/wumei-iot/src/main/resources/mapper/tdengine/TDDeviceLogMapper.xml b/springboot/wumei-iot/src/main/resources/mapper/tdengine/TDDeviceLogMapper.xml index 1a0e4ba8..05f8770a 100644 --- a/springboot/wumei-iot/src/main/resources/mapper/tdengine/TDDeviceLogMapper.xml +++ b/springboot/wumei-iot/src/main/resources/mapper/tdengine/TDDeviceLogMapper.xml @@ -117,7 +117,7 @@ is_monitor=1 and device_id = #{device.deviceId} - and identity like concat('%', #{device.identity}, '%') + and identity like #{device.identity} order by ts desc limit 2000 @@ -130,7 +130,7 @@ is_monitor !=1 and device_id = #{device.deviceId} and log_type = #{device.logType} - and identity like concat('%', #{device.identity}, '%') + and identity like #{device.identity} order by ts desc -- Gitee