Эх сурвалжийг харах

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

jingyuanchao 1 жил өмнө
parent
commit
7c55519669

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