根据mac地址查询设备详情

This commit is contained in:
2025-08-18 11:04:23 +08:00
parent b51e88052f
commit 9a6bf05c4b
4 changed files with 24 additions and 9 deletions

View File

@ -67,4 +67,5 @@ public interface DeviceMapper extends BaseMapper<Device> {
*/
List<Device> findByOriginalDeviceId(Long originalDeviceId);
AppDeviceVo getDeviceInfo(@Param("deviceMac") String deviceMac);
}

View File

@ -212,5 +212,22 @@
FROM device
WHERE original_device_id = #{originalDeviceId}
</select>
<select id="getDeviceInfo" resultType="com.fuyuanshen.equipment.domain.vo.AppDeviceVo">
select d.id, d.device_name, d.device_name,
d.device_name,
d.device_mac,
d.device_sn,
d.device_imei,
d.device_pic,
dt.type_name,
dt.communication_mode,
d.bluetooth_name,
dt.model_dictionary detailPageUrl,
c.binding_time
from device d
inner join device_type dt on d.device_type = dt.id
inner join app_device_bind_record c on d.id = c.device_id
where d.device_mac = #{deviceMac}
</select>
</mapper>