修复获取虚拟设备列表接口分页BUG

V0.5.x
zhangpengxiang 2024-02-23 13:45:41 +08:00
parent c06bf77aa2
commit 6e6c3290be
2 changed files with 4 additions and 3 deletions

View File

@ -97,11 +97,11 @@ public class VirtualDevice implements Owned<String> {
/**
*
*/
private String state = STATE_STOPPED;
private String state;
/**
*
*/
private Long createAt = System.currentTimeMillis();
private Long createAt;
}

View File

@ -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<VirtualDevice> getDevices(PageRequest<VirtualDevice> pageRequest) {
public Paging<VirtualDevice> getDevices(@Validated(QueryGroup.class)@RequestBody PageRequest<VirtualDevice> pageRequest) {
return virtualDeviceData.findAll(pageRequest);
}