feat(device): 更新设备响应字段
All checks were successful
ZhenTu-BE/pipeline/head This commit looks good

- 将 deviceNo 和 channelNo 字段替换为 previewUrl 和 previewCoverUrl
- 修改 DeviceRespVO 类中的字段定义- 在 AppScenicServiceImpl 中更新设备配置信息的设置逻辑
This commit is contained in:
2025-10-22 12:19:22 +08:00
parent 2d2ed6fc1b
commit 6242a346ce
2 changed files with 4 additions and 4 deletions

View File

@@ -38,6 +38,6 @@ public class DeviceRespVO {
private String scenicName;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date keepaliveAt;
private String deviceNo;
private String channelNo;
private String previewUrl;
private String previewCoverUrl;
}

View File

@@ -285,8 +285,8 @@ public class AppScenicServiceImpl implements AppScenicService {
deviceRespVO.setNo(device.getNo());
DeviceConfigManager config = deviceRepository.getDeviceConfigManager(device.getId());
deviceRespVO.setDeviceNo(device.getNo());
deviceRespVO.setChannelNo(config.getString("channel_no"));
deviceRespVO.setPreviewUrl(config.getString("preview_url"));
deviceRespVO.setPreviewCoverUrl(config.getString("preview_cover_url"));
return deviceRespVO;
}).collect(Collectors.toList());
for (DeviceRespVO deviceRespVO : deviceRespVOList) {