From d739bfa5976e36ced26f906ab16f83c20c8cb27c Mon Sep 17 00:00:00 2001
From: xiaoxie <hotcoffie@163.com>
Date: 星期一, 23 五月 2022 09:44:21 +0800
Subject: [PATCH] 处理冲突

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMStatusEventListener.java |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMStatusEventListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMStatusEventListener.java
index 5b0741b..f4a9feb 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMStatusEventListener.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/event/ZLMStatusEventListener.java
@@ -1,17 +1,16 @@
 package com.genersoft.iot.vmp.media.zlm.event;
 
 import com.genersoft.iot.vmp.service.IMediaServerService;
+import com.genersoft.iot.vmp.service.IPlayService;
 import com.genersoft.iot.vmp.service.IStreamProxyService;
 import com.genersoft.iot.vmp.service.IStreamPushService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationListener;
 import org.springframework.context.event.EventListener;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
 
-import java.text.SimpleDateFormat;
 
 /**
  * @description: 鍦ㄧ嚎浜嬩欢鐩戝惉鍣紝鐩戝惉鍒扮绾垮悗锛屼慨鏀硅澶囩鍦ㄧ嚎鐘舵�併�� 璁惧鍦ㄧ嚎鏈変袱涓潵婧愶細
@@ -34,13 +33,13 @@
 	@Autowired
 	private IMediaServerService mediaServerService;
 
-	private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+	@Autowired
+	private IPlayService playService;
 
 	@Async
 	@EventListener
 	public void onApplicationEvent(ZLMOnlineEvent event) {
-
-		logger.info("ZLM涓婄嚎浜嬩欢瑙﹀彂锛孖D锛�" + event.getMediaServerId());
+		logger.info("[ZLM] 涓婄嚎 ID锛�" + event.getMediaServerId());
 		streamPushService.zlmServerOnline(event.getMediaServerId());
 		streamProxyService.zlmServerOnline(event.getMediaServerId());
 
@@ -50,11 +49,11 @@
 	@EventListener
 	public void onApplicationEvent(ZLMOfflineEvent event) {
 
-		logger.info("ZLM绂荤嚎浜嬩欢瑙﹀彂锛孖D锛�" + event.getMediaServerId());
+		logger.info("[ZLM] 绂荤嚎锛孖D锛�" + event.getMediaServerId());
 		// 澶勭悊ZLM绂荤嚎
 		mediaServerService.zlmServerOffline(event.getMediaServerId());
 		streamProxyService.zlmServerOffline(event.getMediaServerId());
 		streamPushService.zlmServerOffline(event.getMediaServerId());
-		// TODO 澶勭悊瀵瑰浗鏍囩殑褰卞搷
+		playService.zlmServerOffline(event.getMediaServerId());
 	}
 }

--
Gitblit v1.8.0