mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-27 17:43:55 +08:00
fix:用户别名缺失bug
This commit is contained in:
-1
@@ -304,7 +304,6 @@ public class DeviceServiceImpl extends BaseServiceImpl<DeviceDao, DeviceEntity>
|
|||||||
return devices.stream().map(device -> {
|
return devices.stream().map(device -> {
|
||||||
UserShowDeviceListVO vo = ConvertUtils.sourceToTarget(device, UserShowDeviceListVO.class);
|
UserShowDeviceListVO vo = ConvertUtils.sourceToTarget(device, UserShowDeviceListVO.class);
|
||||||
vo.setDeviceType(device.getBoard());
|
vo.setDeviceType(device.getBoard());
|
||||||
vo.setBoard(device.getBoard());
|
|
||||||
// 设置UTC时间戳供前端使用时区转换
|
// 设置UTC时间戳供前端使用时区转换
|
||||||
if (device.getLastConnectedAt() != null) {
|
if (device.getLastConnectedAt() != null) {
|
||||||
vo.setLastConnectedAtTimestamp(device.getLastConnectedAt().getTime());
|
vo.setLastConnectedAtTimestamp(device.getLastConnectedAt().getTime());
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package xiaozhi.modules.device.vo;
|
package xiaozhi.modules.device.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "用户显示设备列表VO")
|
@Schema(description = "用户显示设备列表VO")
|
||||||
public class UserShowDeviceListVO {
|
public class UserShowDeviceListVO {
|
||||||
@@ -28,6 +29,9 @@ public class UserShowDeviceListVO {
|
|||||||
@Schema(description = "mac地址")
|
@Schema(description = "mac地址")
|
||||||
private String macAddress;
|
private String macAddress;
|
||||||
|
|
||||||
|
@Schema(description = "设备别名")
|
||||||
|
private String alias;
|
||||||
|
|
||||||
@Schema(description = "开启OTA")
|
@Schema(description = "开启OTA")
|
||||||
private Integer otaUpgrade;
|
private Integer otaUpgrade;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user