!40 fix: 修复获取虚拟设备列表分页BUG

Merge pull request !40 from 张鹏翔/dev-V0.5.0
V0.5.x
xiwa 2024-02-24 02:09:36 +00:00 committed by Gitee
commit 062c9568a9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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);
}