diff --git a/src/main/java/com/ycwl/basic/controller/pc/DeviceV2Controller.java b/src/main/java/com/ycwl/basic/controller/pc/DeviceV2Controller.java index 784e1269..4758372c 100644 --- a/src/main/java/com/ycwl/basic/controller/pc/DeviceV2Controller.java +++ b/src/main/java/com/ycwl/basic/controller/pc/DeviceV2Controller.java @@ -368,50 +368,19 @@ public class DeviceV2Controller { // ========== 景区设备管理操作 ========== - /** - * 获取景区IPC设备列表 - */ - @GetMapping("/scenic/{scenicId}/ipc") - public ApiResponse> getScenicIpcDevices(@PathVariable Long scenicId, - @RequestParam(defaultValue = "1") Integer page, - @RequestParam(defaultValue = "10") Integer pageSize) { - log.info("获取景区IPC设备列表, scenicId: {}, page: {}, pageSize: {}", scenicId, page, pageSize); - try { - PageResponse response = deviceIntegrationService.getScenicIpcDevices(scenicId, page, pageSize); - return ApiResponse.success(response); - } catch (Exception e) { - log.error("获取景区IPC设备列表失败, scenicId: {}", scenicId, e); - return ApiResponse.fail("获取景区IPC设备列表失败: " + e.getMessage()); - } - } - - /** - * 获取景区激活设备列表 - */ - @GetMapping("/scenic/{scenicId}/active") - public ApiResponse> getScenicActiveDevices(@PathVariable Long scenicId, - @RequestParam(defaultValue = "1") Integer page, - @RequestParam(defaultValue = "10") Integer pageSize) { - log.info("获取景区激活设备列表, scenicId: {}, page: {}, pageSize: {}", scenicId, page, pageSize); - try { - PageResponse response = deviceIntegrationService.getScenicActiveDevices(scenicId, page, pageSize); - return ApiResponse.success(response); - } catch (Exception e) { - log.error("获取景区激活设备列表失败, scenicId: {}", scenicId, e); - return ApiResponse.fail("获取景区激活设备列表失败: " + e.getMessage()); - } - } - /** * 获取景区所有设备列表 */ - @GetMapping("/scenic/{scenicId}/all") + @GetMapping("/scenic/{scenicId}") public ApiResponse> getScenicAllDevices(@PathVariable Long scenicId, + @RequestParam(required = false) String name, + @RequestParam(required = false) String type, + @RequestParam(required = false) String no, @RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer pageSize) { log.info("获取景区所有设备列表, scenicId: {}, page: {}, pageSize: {}", scenicId, page, pageSize); try { - PageResponse response = deviceIntegrationService.listDevices(page, pageSize, null, null, null, null, scenicId); + PageResponse response = deviceIntegrationService.listDevices(page, pageSize, name, no, type, null, scenicId); return ApiResponse.success(response); } catch (Exception e) { log.error("获取景区所有设备列表失败, scenicId: {}", scenicId, e);