From c9fe1b65bf3b2cf2a935edeb3370f73a55f0ce67 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期六, 10 五月 2025 08:58:19 +0800
Subject: [PATCH] 修改《打包发布配置修改》文档
---
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/msCenter/CenterMsReceiveCtrl.java | 32 +++++++++++++++++++++++---------
1 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/msCenter/CenterMsReceiveCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/msCenter/CenterMsReceiveCtrl.java
index 839d8f0..0678465 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/msCenter/CenterMsReceiveCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/msCenter/CenterMsReceiveCtrl.java
@@ -1,10 +1,12 @@
package com.dy.pipIrrRemote.msCenter;
+import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.dy.common.contant.Constant;
import com.dy.common.multiDataSource.DataSourceContext;
import com.dy.common.util.NumUtil;
import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.WebSocketMessage;
import com.dy.pipIrrRemote.largeScreen.WebSocketServer;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -26,7 +28,8 @@
*/
@Slf4j
-@Tag(name = "閫氫俊涓棿娑堟伅涓績鎺ㄩ�佹秷鎭帴鏀舵柟", description = "閫氫俊涓棿娑堟伅涓績鎺ㄩ�佹秷鎭帴鏀舵柟")
+@Hidden //涓嶅叕寮�鎺ュ彛锛屽叾鍙湁閫氫俊涓棿浠惰皟鐢�
+@Tag(name = "閫氫俊涓棿浠舵秷鎭腑蹇冩帹閫佹秷鎭帴鏀惰��", description = "閫氫俊涓棿浠舵秷鎭腑蹇冩帹閫佹秷鎭帴鏀惰��")
@RestController
@RequestMapping(path="msCenter")
public class CenterMsReceiveCtrl{
@@ -35,9 +38,9 @@
private CenterMsReceiveSv sv ;
/**
- * 閫氫俊涓棿娑堟伅涓績鎺ㄩ�佹秷鎭帴鏀�
- * @param list 娑堟伅闆嗗悎
- * @return 鎿嶄綔缁撴灉
+ * 閫氫俊涓棿浠舵秷鎭腑蹇冩帹閫佹秷鎭帴鏀�
+ * @param list 娑堟伅鏁版嵁闆嗗悎
+ * @return 鏃犺繑鍥炵粨鏋�
*/
@Hidden //涓嶅叕寮�鎺ュ彛锛屽叾鍙湁閫氫俊涓棿浠惰皟鐢�
@PostMapping(path = "receive", consumes = MediaType.APPLICATION_JSON_VALUE)
@@ -64,14 +67,25 @@
jo.put("intakeNum", intakeNum) ;
}
}
- try {
- WebSocketServer.sendAllMessage(jo.toJSONString());
- }catch (Exception e){
- log.error("鎺ㄩ�佹秷鎭け璐�", e) ;
- }
}
}
+ sendByWebSocket(list) ;
}
return null ;
}
+
+ /**
+ * 閫氳繃websocket鎶婃秷鎭帹閫佸嚭鍘伙紝褰撳墠鎺ユ敹鏂规槸鍓嶇鐨勫ぇ灞忓睍绀烘ā鍧�
+ * @param list
+ */
+ private void sendByWebSocket(List<JSONObject> list){
+ WebSocketMessage vo = new WebSocketMessage() ;
+ vo.type = WebSocketMessage.TYPE_JSON ;
+ vo.content = list ;
+ try {
+ WebSocketServer.sendMessage2AllClient(JSON.toJSONString(vo));
+ }catch (Exception e){
+ log.error("鎺ㄩ�佹秷鎭け璐�", e) ;
+ }
+ }
}
--
Gitblit v1.8.0