1
0

WEB:分页查询设备列表

This commit is contained in:
2025-07-04 15:49:23 +08:00
parent 3947f9b6f0
commit 2d34120b45
4 changed files with 6 additions and 7 deletions

View File

@ -62,7 +62,7 @@ public class DeviceController {
@Operation(summary = "分页查询设备列表", security = {@SecurityRequirement(name = "bearer-key")}) @Operation(summary = "分页查询设备列表", security = {@SecurityRequirement(name = "bearer-key")})
@GetMapping @GetMapping
public TableDataInfo<Device> queryDevice(DeviceQueryCriteria criteria) throws IOException { public TableDataInfo<Device> queryDevice(DeviceQueryCriteria criteria) throws IOException {
Page<Device> page = new Page<>(criteria.getPage(), criteria.getSize()); Page<Device> page = new Page<>(criteria.getPageNum(), criteria.getPageSize());
return deviceService.queryAll(criteria, page); return deviceService.queryAll(criteria, page);
} }

View File

@ -33,7 +33,7 @@ public class DeviceTypeController {
@GetMapping @GetMapping
@Operation(summary = "分页查询设备类型") @Operation(summary = "分页查询设备类型")
public TableDataInfo<DeviceType> queryDeviceType(DeviceTypeQueryCriteria criteria) { public TableDataInfo<DeviceType> queryDeviceType(DeviceTypeQueryCriteria criteria) {
Page<DeviceType> page = new Page<>(criteria.getPage(), criteria.getSize()); Page<DeviceType> page = new Page<>(criteria.getPageNum(), criteria.getPageSize());
return deviceTypeService.queryAll(criteria, page); return deviceTypeService.queryAll(criteria, page);
} }

View File

@ -45,10 +45,10 @@ public class DeviceQueryCriteria extends BaseEntity {
private Integer deviceStatus; private Integer deviceStatus;
@Schema(name = "页码", example = "1") @Schema(name = "页码", example = "1")
private Integer page = 1; private Integer pageNum = 1;
@Schema(name = "每页数据量", example = "10") @Schema(name = "每页数据量", example = "10")
private Integer size = 10; private Integer pageSize = 10;
@Schema(name = "客户id") @Schema(name = "客户id")
private Long customerId; private Long customerId;

View File

@ -31,9 +31,8 @@ public class DeviceTypeQueryCriteria extends BaseEntity implements Serializable
private Long tenantId; private Long tenantId;
@Schema(name = "页码", example = "1") @Schema(name = "页码", example = "1")
private Integer page = 1; private Integer pageNum = 1;
@Schema(name = "每页数据量", example = "10") @Schema(name = "每页数据量", example = "10")
private Integer size = 10; private Integer pageSize = 10;
} }