feat(device): 支持按多个景区ID查询设备列表

- 在 DeviceV2Client 中新增 scenicIds 查询参数
- 修改 DeviceIntegrationService.listDevices 方法以支持 scenicIds 参数
- 优化参数优先级逻辑:scenicId 优先于 scenicIds
- 更新所有调用点以传递新的 scenicIds 参数
- 保持向后兼容性,确保原有接口行为不变
- 增加日志记录以便调试和监控参数使用情况
This commit is contained in:
2025-12-02 09:39:04 +08:00
parent 9becd6bfa7
commit 36f85dbb63
10 changed files with 43 additions and 23 deletions

View File

@@ -309,7 +309,7 @@ public class AppScenicServiceImpl implements AppScenicService {
@Override
public ApiResponse<List<DeviceRespVO>> getDevices(Long scenicId) {
PageResponse<DeviceV2DTO> deviceV2ListResponse = deviceIntegrationService.listDevices(1, 1000, null, null, null, 1, scenicId);
PageResponse<DeviceV2DTO> deviceV2ListResponse = deviceIntegrationService.listDevices(1, 1000, null, null, null, 1, scenicId, null);
List<DeviceRespVO> deviceRespVOList = deviceV2ListResponse.getList().stream().map(device -> {
DeviceRespVO deviceRespVO = new DeviceRespVO();
deviceRespVO.setId(device.getId());