You've already forked FrameTour-BE
feat(device): 添加获取设备基本信息的方法
- 新增 getDeviceBasic 方法直接返回 DeviceV2DTO 实例 - 添加设备基本信息查询的日志记录 - 实现通过设备ID获取设备详情的功能集成调用
This commit is contained in:
@@ -97,6 +97,17 @@ public class DeviceRepository {
|
|||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取设备基本信息(直接返回DeviceV2DTO)
|
||||||
|
*
|
||||||
|
* @param deviceId 设备ID
|
||||||
|
* @return DeviceV2DTO实例
|
||||||
|
*/
|
||||||
|
public DeviceV2DTO getDeviceBasic(Long deviceId) {
|
||||||
|
log.debug("获取设备基本信息, deviceId: {}", deviceId);
|
||||||
|
return deviceIntegrationService.getDevice(deviceId);
|
||||||
|
}
|
||||||
|
|
||||||
public DeviceEntity getDeviceByDeviceNo(String deviceNo) {
|
public DeviceEntity getDeviceByDeviceNo(String deviceNo) {
|
||||||
log.debug("根据设备编号获取设备信息, deviceNo: {}", deviceNo);
|
log.debug("根据设备编号获取设备信息, deviceNo: {}", deviceNo);
|
||||||
DeviceV2DTO deviceDto = deviceIntegrationService.getDeviceByNo(deviceNo);
|
DeviceV2DTO deviceDto = deviceIntegrationService.getDeviceByNo(deviceNo);
|
||||||
|
|||||||
Reference in New Issue
Block a user