#20230510 欣影管理平台装置信息查询代码

master
18616268358 2 years ago
parent ee2a2c3182
commit 4a5ac4b600

@ -169,9 +169,14 @@
left join tower c on a.tower_id = c.id)
left join terminal_channel_mapper d on a.id = d.term_id)
left join terminal_channels e on d.channel_id = e.id)
left join terminal_photos tp on tp.channel_id = e.id and tp.term_id = a.id )
left join terminal_photo_marks tpm on a.id = tpm.term_id and e.id = tpm.channel_id)
left join terminal_photo_mark_paths tpmp on tpmp.mark_id = tpm.id)
left join
(
SELECT path,term_id,channel_id
from terminal_photos
where id in (select max(id) from terminal_photos GROUP BY term_id,channel_id)
) tp on tp.channel_id = e.id and tp.term_id = a.id )
WHERE a.status = 1
order by a.create_time desc
</select>

Loading…
Cancel
Save