Просмотр исходного кода

fix: 【IoT 物联网】修复 IotDeviceServiceImpl 中的更新支持逻辑,确保在不支持更新时抛出异常

haohao месяцев назад: 6
Родитель
Сommit
ca014bdba5

+ 1 - 1
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/service/device/IotDeviceServiceImpl.java

@@ -382,7 +382,7 @@ public class IotDeviceServiceImpl implements IotDeviceService {
                     return;
                 }
                 // 2.2.2 如果存在,判断是否允许更新
-                if (updateSupport) {
+                if (!updateSupport) {
                     throw exception(DEVICE_KEY_EXISTS);
                 }
                 updateDevice(new IotDeviceSaveReqVO().setId(existDevice.getId())