2022年5月24日19:20:31 修复查询设备日志和检测数据报错问题

This commit is contained in:
wxy001
2022-05-24 19:20:54 +08:00
parent 14197e7436
commit 2788764430
3 changed files with 7 additions and 4 deletions

View File

@@ -49,6 +49,9 @@ public class TdengineLogServiceImpl implements ILogService {
@Override
public List<MonitorModel> selectMonitorList(DeviceLog deviceLog) {
if(deviceLog.getIdentity()!=null){
deviceLog.setIdentity("%"+deviceLog.getIdentity()+"%");
}
return tdDeviceLogDAO.selectMonitorList(dbName,deviceLog);
}
}

View File

@@ -117,7 +117,7 @@
<where>
is_monitor=1
<if test="device.deviceId!=null"> and device_id = #{device.deviceId} </if>
<if test="device.identity != null and device.identity != ''"> and identity like concat('%', #{device.identity}, '%')</if>
<if test="device.identity != null and device.identity != ''"> and identity like #{device.identity}</if>
order by ts desc
limit 2000
@@ -130,7 +130,7 @@
is_monitor !=1
<if test="device.deviceId!=null"> and device_id = #{device.deviceId} </if>
<if test="device.logType != null "> and log_type = #{device.logType}</if>
<if test="device.identity != null and device.identity != ''"> and identity like concat('%', #{device.identity}, '%')</if>
<if test="device.identity != null and device.identity != ''"> and identity like #{device.identity}</if>
</where>
order by ts desc
</select>