فهرست منبع

履职登记-智能运维数据错误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;
     }