From 6e6c3290be80158d3a09a701f91218578771d0b9 Mon Sep 17 00:00:00 2001 From: zhangpengxiang Date: Fri, 23 Feb 2024 13:45:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96=E8=99=9A?= =?UTF-8?q?=E6=8B=9F=E8=AE=BE=E5=A4=87=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=88=86=E9=A1=B5BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cc/iotkit/model/device/VirtualDevice.java | 4 ++-- .../cc/iotkit/manager/controller/VirtualDeviceController.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/device/VirtualDevice.java b/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/device/VirtualDevice.java index 13d86885..0dc57f9a 100644 --- a/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/device/VirtualDevice.java +++ b/iot-dao/iot-data-model/src/main/java/cc/iotkit/model/device/VirtualDevice.java @@ -97,11 +97,11 @@ public class VirtualDevice implements Owned { /** * 运行状态 */ - private String state = STATE_STOPPED; + private String state; /** * 创建时间 */ - private Long createAt = System.currentTimeMillis(); + private Long createAt; } diff --git a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/controller/VirtualDeviceController.java b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/controller/VirtualDeviceController.java index 91345e8d..2bb9b6df 100644 --- a/iot-module/iot-manager/src/main/java/cc/iotkit/manager/controller/VirtualDeviceController.java +++ b/iot-module/iot-manager/src/main/java/cc/iotkit/manager/controller/VirtualDeviceController.java @@ -15,6 +15,7 @@ import cc.iotkit.common.api.Request; import cc.iotkit.common.enums.ErrCode; import cc.iotkit.common.exception.BizException; import cc.iotkit.common.utils.ReflectUtil; +import cc.iotkit.common.validate.QueryGroup; import cc.iotkit.data.manager.IVirtualDeviceData; import cc.iotkit.manager.dto.bo.ChangeStateBo; import cc.iotkit.manager.dto.bo.device.DeviceLogQueryBo; @@ -56,7 +57,7 @@ public class VirtualDeviceController { @ApiOperation("获取虚拟设备列表") @SaCheckPermission("iot:virtualDevice:query") @PostMapping("/list") - public Paging getDevices(PageRequest pageRequest) { + public Paging getDevices(@Validated(QueryGroup.class)@RequestBody PageRequest pageRequest) { return virtualDeviceData.findAll(pageRequest); }