Przeglądaj źródła

修复 水肥机获取状态失败的问题

zhaiyifei 8 miesięcy temu
rodzic
commit
ce0c16882d

+ 3 - 0
src/main/java/com/yunfeiyun/agmp/iotm/device/sf/service/IIotSfCommService.java

@@ -295,6 +295,9 @@ public class IIotSfCommService extends IotDeviceBaseServiceImpl implements IotDe
             throw new IotBizException(ErrorCode.INVALID_PARAMETER.getCode(),"设备不存在");
         }
         IotDeviceconfig iotDeviceconfig = iIotDeviceconfigService.selectIotDeviceConfigByDevBid(devBid);
+        if(iotDeviceconfig == null){
+            throw new IotBizException(ErrorCode.INVALID_PARAMETER.getCode(),"配置信息不存在,请检查设备");
+        }
         return JSONObject.parseObject(iotDeviceconfig.getDevcfgContext());
     }