|
|
@ -169,9 +169,14 @@
|
|
|
|
left join tower c on a.tower_id = c.id)
|
|
|
|
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_channel_mapper d on a.id = d.term_id)
|
|
|
|
left join terminal_channels e on d.channel_id = e.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_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 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
|
|
|
|
WHERE a.status = 1
|
|
|
|
order by a.create_time desc
|
|
|
|
order by a.create_time desc
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|