소스 검색

补充告警记录查询不到的异常处理

liuyaowen 11 달 전
부모
커밋
77cc84e96a
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/main/java/com/yunfeiyun/agmp/iotm/web/service/impl/IotWarnlogServiceImpl.java

+ 3 - 0
src/main/java/com/yunfeiyun/agmp/iotm/web/service/impl/IotWarnlogServiceImpl.java

@@ -61,6 +61,9 @@ public class IotWarnlogServiceImpl implements IIotWarnlogService {
     @Override
     @Override
     public IotWarnlogResVo selectIotWarnlogResVoByWlBid(String wlBid, String tid){
     public IotWarnlogResVo selectIotWarnlogResVoByWlBid(String wlBid, String tid){
         IotWarnlog iotWarnlog = iotWarnlogMapper.selectIotWarnlogById(wlBid, tid);
         IotWarnlog iotWarnlog = iotWarnlogMapper.selectIotWarnlogById(wlBid, tid);
+        if(null == iotWarnlog){
+            return null;
+        }
         IotWarnlogResVo iotWarnlogResVo = new IotWarnlogResVo();
         IotWarnlogResVo iotWarnlogResVo = new IotWarnlogResVo();
         BeanUtils.copyProperties(iotWarnlog,iotWarnlogResVo);
         BeanUtils.copyProperties(iotWarnlog,iotWarnlogResVo);
         IotDevice iotDevice = iotDeviceMapper.selectIotDeviceByDevBid(iotWarnlogResVo.getDevBid());
         IotDevice iotDevice = iotDeviceMapper.selectIotDeviceByDevBid(iotWarnlogResVo.getDevBid());