From 3b2bfd50d5682cf2a753505bc0971bbec8e6ec25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Sat, 19 Apr 2025 19:38:59 +0800 Subject: [PATCH] debug --- .../src/main/java/com/ruoyi/web/bst/DeviceIotController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-web/src/main/java/com/ruoyi/web/bst/DeviceIotController.java b/ruoyi-web/src/main/java/com/ruoyi/web/bst/DeviceIotController.java index 2a2c5ba..8339b14 100644 --- a/ruoyi-web/src/main/java/com/ruoyi/web/bst/DeviceIotController.java +++ b/ruoyi-web/src/main/java/com/ruoyi/web/bst/DeviceIotController.java @@ -35,10 +35,10 @@ public class DeviceIotController extends BaseController { private DeviceVO getDevice(Long id, String sn) { if (id != null) { - ServiceUtil.assertion(deviceValidator.canOperate(id), "您无权限操作ID为%s的设备", id); + ServiceUtil.assertion(!deviceValidator.canOperate(id), "您无权限操作ID为%s的设备", id); return deviceService.selectDeviceById(id, true); } else if (sn != null) { - ServiceUtil.assertion(deviceValidator.canOperate(sn), "您无权限操作SN为%s的设备", sn); + ServiceUtil.assertion(!deviceValidator.canOperate(sn), "您无权限操作SN为%s的设备", sn); return deviceService.selectDeviceBySn(sn, true); } else { throw new ServiceException("SN和ID不能同时为空");