panlinlin
2021-01-15 cf8a22f50b81fa30abaa518bdce660cd65deabea
src/main/java/com/genersoft/iot/vmp/gb28181/event/platformNotRegister/PlatformNotRegisterEventLister.java
@@ -3,6 +3,7 @@
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
import com.genersoft.iot.vmp.gb28181.event.online.OnlineEvent;
import com.genersoft.iot.vmp.gb28181.event.online.OnlineEventListener;
import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform;
import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
import com.genersoft.iot.vmp.utils.redis.RedisUtil;
import org.slf4j.Logger;
@@ -26,6 +27,8 @@
    @Autowired
    private IVideoManagerStorager storager;
    @Autowired
    private SIPCommanderFroPlatform sipCommanderFroPlatform;
    @Autowired
    private RedisUtil redis;
@@ -33,13 +36,13 @@
    @Override
    public void onApplicationEvent(PlatformNotRegisterEvent event) {
        if (logger.isDebugEnabled()) {
            logger.debug("平台未注册事件触发,平台国标ID:" + event.getPlatformGbID());
        }
        logger.debug("平台未注册事件触发,平台国标ID:" + event.getPlatformGbID());
        ParentPlatform parentPlatform = storager.queryParentPlatById(event.getPlatformGbID());
        if (parentPlatform == null) {
            logger.debug("平台未注册事件触发,但平台已经删除!!! 平台国标ID:" + event.getPlatformGbID());
            return;
        }
        sipCommanderFroPlatform.register(parentPlatform);
    }
}