jingyuanchao 1 жил өмнө
parent
commit
62bc61f7b0

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

@@ -23,14 +23,8 @@ 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;
-        }
         //此处考虑录像完整性和录像天数,任意一个异常就算异常
-        int i= videoDaysCheckMapper.selectExceptionCount(orgId);
-        return i;
+        return videoDaysCheckMapper.selectExceptionCount(orgId);
     }
 
 

+ 1 - 0
soc-modules/soc-modules-iot/src/main/resources/mapper/VideoDaysCheckmapper.xml → soc-modules/soc-modules-iot/src/main/resources/mapper/VideoDaysCheckMapper.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xunmei.iot.mapper.VideoDaysCheckMapper">
+
     <select id="selectExceptionCount" resultType="java.lang.Integer">
         select sum(CASE
                        WHEN vdc.status = 0 and vic.status = 0 THEN 0