2025-10-18 zwy 更新PaginationData获取已绑定的设备信息接口,增加对部门deptId的查询条件,参数可不传,返回所有数据
| | |
| | | public ResponseResult<PaginationData<DeviceDTO>> getBoundDevicesWithDomain(Integer domain, |
| | | @RequestParam(defaultValue = "1") Long page, |
| | | @RequestParam(value = "page_size", |
| | | defaultValue = "50") Long pageSize) { |
| | | PaginationData<DeviceDTO> devices = deviceService.getBoundDevicesWithDomain(page, pageSize, domain); |
| | | defaultValue = "50") Long pageSize, |
| | | @RequestParam(required = false) Long deptId) { |
| | | PaginationData<DeviceDTO> devices = deviceService.getBoundDevicesWithDomain(page, pageSize, domain, deptId); |
| | | |
| | | return ResponseResult.success(devices); |
| | | } |
| | |
| | | * @param domain |
| | | * @return |
| | | */ |
| | | PaginationData<DeviceDTO> getBoundDevicesWithDomain(Long page, Long pageSize, Integer domain); |
| | | PaginationData<DeviceDTO> getBoundDevicesWithDomain(Long page, Long pageSize, Integer domain, Long deptId); |
| | | |
| | | /** |
| | | * Unbind device base on device's sn. |
| | |
| | | */ |
| | | @Override |
| | | public PaginationData<DeviceDTO> getBoundDevicesWithDomain(Long page, |
| | | Long pageSize, Integer domain) { |
| | | Long pageSize, Integer domain, Long deptId) { |
| | | |
| | | Page<DeviceEntity> pagination = mapper.selectPage(new Page<>(page, pageSize), |
| | | new LambdaQueryWrapper<DeviceEntity>() |
| | | .eq(DeviceEntity::getDomain, domain) |
| | | .eq(deptId != null, DeviceEntity::getDeptId, deptId) |
| | | .isNotNull(DeviceEntity::getDeptId)); |
| | | // .eq(DeviceEntity::getBoundStatus, true)); |
| | | List<DeviceDTO> devicesList = pagination.getRecords().stream().map(this::deviceEntityConvertToDTO) |