select relation_id,relation_device_id,device_name,device_code,create_time from t_relation_device_info where relation_device_id=#{relationDeviceId} and is_del='0'
select a.device_name,b.status,b.potency,b.create_time,b.device_code from t_relation_device_info a left join t_relation_device_data b on a.device_code=b.device_code
where a.relation_device_id=#{deviceId} order by b.create_time desc LIMIT 100000)b group by b.device_code