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