From fdfa8b3b237d8bba8964bda67364f54c08d79432 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期五, 18 七月 2025 16:17:17 +0800
Subject: [PATCH] 修改生产环境配置

---
 ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/netty/server/NettyHandle.java |   80 ++++++++++++++++++++++++---------------
 1 files changed, 49 insertions(+), 31 deletions(-)

diff --git a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/netty/server/NettyHandle.java b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/netty/server/NettyHandle.java
index b05df08..d92b00b 100644
--- a/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/netty/server/NettyHandle.java
+++ b/ruoyi-service/ruoyi-dataInterchange/src/main/java/com/ruoyi/dataInterchange/netty/server/NettyHandle.java
@@ -54,6 +54,15 @@
 	@Resource
 	private BaseMsgService baseMsgService = SpringUtils.getBean(BaseMsgService.class);
 	
+	@Resource
+	private AuthorizeMsgService authorizeMsgService = SpringUtils.getBean(AuthorizeMsgService.class);
+	
+	@Resource
+	private RealvideoMsgService realvideoMsgService = SpringUtils.getBean(RealvideoMsgService.class);
+	
+	@Resource
+	private PlaybackMsgService playbackMsgService = SpringUtils.getBean(PlaybackMsgService.class);
+	
 	
 	@Override
 	public void channelRead(ChannelHandlerContext ctx, Object object) throws Exception {
@@ -89,28 +98,6 @@
 		
 	}
 	
-	
-	@Override
-	public void channelActive(ChannelHandlerContext ctx) throws Exception {
-		log.info("Netty客户端链接成功");
-		super.channelActive(ctx);
-	}
-	
-	
-	@Override
-	public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
-		log.info("Netty客户端连链接常关闭");
-		cause.printStackTrace();
-		ctx.close();
-	}
-	
-	@Override
-	public void channelInactive(ChannelHandlerContext ctx) throws Exception {
-		log.info("Netty客户端离线");
-		super.channelInactive(ctx);
-	}
-	
-	
 	/**
 	 * 业务路由
 	 *
@@ -119,42 +106,73 @@
 	 * @param out
 	 */
 	public void serviceRouting(DataType dataType, ChannelHandlerContext ctx, OuterPacket out) {
-		log.info("主链路信息交换响应({}):{}", dataType.getCode(), out);
+		log.debug("主链路信息交换响应({}):{}", dataType.getCode(), out);
 		switch (dataType) {
 			case UP_CONNECT_REQ:
-				log.info("主链路登录请求({}):{}", DataType.UP_CONNECT_REQ.getCode(), out);
+				log.debug("主链路登录请求({}):{}", DataType.UP_CONNECT_REQ.getCode(), out);
 				connectReqService.connect(ctx, out);
 				break;
 			case UP_DISCONNECT_REQ:
-				log.info("主链路注销请求({}):{}", DataType.UP_DISCONNECT_REQ.getCode(), out);
+				log.debug("主链路注销请求({}):{}", DataType.UP_DISCONNECT_REQ.getCode(), out);
 				upDisconnectReqService.disconnect(ctx, out);
 				break;
 			case UP_LINKTEST_REQ:
-				log.info("主链路连接保持请求({}):{}", DataType.UP_LINKTEST_REQ.getCode(), out);
+				log.debug("主链路连接保持请求({}):{}", DataType.UP_LINKTEST_REQ.getCode(), out);
 				upLinkTestReqService.linkTest(ctx, out);
 				break;
 			case UP_EXG_MSG:
-				log.info("主链路车辆动态信息交换({}):{}", DataType.UP_EXG_MSG.getCode(), out);
+				log.debug("主链路车辆动态信息交换({}):{}", DataType.UP_EXG_MSG.getCode(), out);
 				exgMsgService.up_exg_msg(ctx, out);
 				break;
 			case UP_PLATFORM_MSG:
-				log.info("主链路平台间信息交互({}):{}", DataType.UP_PLATFORM_MSG.getCode(), out);
+				log.debug("主链路平台间信息交互({}):{}", DataType.UP_PLATFORM_MSG.getCode(), out);
 				platformMsgService.up_platform_msg(ctx, out);
 				break;
 			case UP_WARN_MSG:
-				log.info("报警信息交互({}):{}", DataType.UP_WARN_MSG.getCode(), out);
+				log.debug("报警信息交互({}):{}", DataType.UP_WARN_MSG.getCode(), out);
 				warnMsgService.up_warn_msg(ctx, out);
 				break;
 			case UP_CTRL_MSG:
-				log.info("车辆监管业务({}):{}", DataType.UP_CTRL_MSG.getCode(), out);
+				log.debug("车辆监管业务({}):{}", DataType.UP_CTRL_MSG.getCode(), out);
 				ctrlMsgService.up_ctrl_msg(ctx, out);
 				break;
 			case UP_BASE_MSG:
-				log.info("车辆静态信息交换业务({}):{}", DataType.UP_BASE_MSG.getCode(), out);
+				log.debug("车辆静态信息交换业务({}):{}", DataType.UP_BASE_MSG.getCode(), out);
 				baseMsgService.up_base_msg(ctx, out);
+				break;
+			case UP_AUTHORIZE_MSG:
+				log.debug("视频时效口令交互({}):{}", DataType.UP_AUTHORIZE_MSG.getCode(), out);
+				authorizeMsgService.up_authorize_msg(ctx, out);
+				break;
+			case UP_REALVIDEO_MSG:
+				log.debug("实时音视频交互({}):{}", DataType.UP_REALVIDEO_MSG.getCode(), out);
+				realvideoMsgService.up_realvideo_msg(ctx, out);
+				break;
+			case UP_PLAYBACK_MSG:
+				log.debug("远程录像回放交互({}):{}", DataType.UP_PLAYBACK_MSG.getCode(), out);
+				playbackMsgService.up_playback_msg(ctx, out);
 				break;
 			default:
 				break;
 		}
 	}
+	
+	@Override
+	public void channelActive(ChannelHandlerContext ctx) throws Exception {
+		log.info("Netty客户端链接成功");
+		super.channelActive(ctx);
+	}
+	
+	@Override
+	public void channelInactive(ChannelHandlerContext ctx) throws Exception {
+		log.info("Netty客户端离线");
+		super.channelInactive(ctx);
+	}
+	
+	@Override
+	public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
+		log.info("Netty客户端连链接常关闭");
+		cause.printStackTrace();
+		ctx.close();
+	}
 }

--
Gitblit v1.7.1