Commit b031b963 by 杨林龙

优化设备离线的查询方式

1 parent 7270218f
......@@ -752,7 +752,7 @@
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_device td on td.sn = tvd.sn
left join t_device_location tdl on tdl.sn = td.sn
WHERE 1 = 1
WHERE tvd.del_flag = 0 and tv.del_flag = 0 and tvd.bind_status = 1
and (
(timestampdiff(SECOND, tdl.last_gps_time, now()) > #{offlineTime}
and timestampdiff(SECOND, tdl.last_bs_time, now()) > #{offlineTime} and td.source = 1)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!