소스 검색

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

zhaiyifei 8 달 전
부모
커밋
ce0c16882d
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/main/java/com/yunfeiyun/agmp/iotm/device/sf/service/IIotSfCommService.java

+ 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());
     }