fix: fixed bugs for runtime application

This commit is contained in:
merlin
2025-12-16 18:28:26 +08:00
parent 44133d3667
commit 94d5d8cabe
13 changed files with 85 additions and 37 deletions

View File

@@ -22,17 +22,7 @@ public class WebSocketMessageConsumer {
public void onMessage(String json) {
try {
JSONObject msg = JSON.parseObject(json);
String to = msg.getString("to");
if (to == null || to.isEmpty()) {
// 这是广播 / 系统消息
sessionManager.broadcast(json);
} else {
// 单发消息
// sessionManager.sendToUser(Integer.valueOf(to), json);
commandDispatcher.dispatch(msg);
}
commandDispatcher.dispatch(msg);
} catch (Exception e) {
log.info(e.getMessage());