소스 검색

履职登记-智能运维数据错误buf

jingyuanchao 1 년 전
부모
커밋
7c55519669
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 1
      soc-modules/soc-modules-iot/src/main/java/com/xunmei/iot/service/impl/IotServiceImpl.java

+ 7 - 1
soc-modules/soc-modules-iot/src/main/java/com/xunmei/iot/service/impl/IotServiceImpl.java

@@ -23,8 +23,14 @@ public class IotServiceImpl implements IotService {
 
     @Override
     public Integer selectVideoDayExceptionChannelNums(Long orgId) {
+        LambdaQueryWrapper<IotDvrChannel> channelWrapper = new LambdaQueryWrapper<>();
+        channelWrapper.eq(IotDvrChannel::getOrgId, orgId);
+        if (channelMapper.selectCount(channelWrapper) < 1) {
+            return null;
+        }
         //此处考虑录像完整性和录像天数,任意一个异常就算异常
-        return videoDaysCheckMapper.selectExceptionCount(orgId);
+        int i= videoDaysCheckMapper.selectExceptionCount(orgId);
+        return i;
     }