fix:用户别名缺失bug

This commit is contained in:
hrz
2026-06-01 22:54:34 +08:00
parent 4c4ba0aa08
commit effe95ba8f
2 changed files with 6 additions and 3 deletions
@@ -304,7 +304,6 @@ public class DeviceServiceImpl extends BaseServiceImpl<DeviceDao, DeviceEntity>
return devices.stream().map(device -> {
UserShowDeviceListVO vo = ConvertUtils.sourceToTarget(device, UserShowDeviceListVO.class);
vo.setDeviceType(device.getBoard());
vo.setBoard(device.getBoard());
// 设置UTC时间戳供前端使用时区转换
if (device.getLastConnectedAt() != null) {
vo.setLastConnectedAtTimestamp(device.getLastConnectedAt().getTime());
@@ -1,11 +1,12 @@
package xiaozhi.modules.device.vo;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.Date;
@Data
@Schema(description = "用户显示设备列表VO")
public class UserShowDeviceListVO {
@@ -28,6 +29,9 @@ public class UserShowDeviceListVO {
@Schema(description = "mac地址")
private String macAddress;
@Schema(description = "设备别名")
private String alias;
@Schema(description = "开启OTA")
private Integer otaUpgrade;