SELECT a.id AS id,a.file_name AS fileName,a.release_time AS releaseTime FROM tr_portal_home c LEFT JOIN tr_home_announcement b ON b.home_id=c.id LEFT JOIN publication a ON a.id=b.`publication_id` WHERE c.terminal_id=#{terminalId} and b.state=1 AND a.state=2 order by b.sort