src/main/java/com/xcong/excoin/netty/logic/WebSocketLogic.java
@@ -76,10 +76,12 @@ public void sendMsg(RequestBean requestBean) { String chatStr = requestBean.getData().toString(); log.info("接收到的消息:{}", chatStr); ChatRequest chat = JSONObject.parseObject(chatStr, ChatRequest.class); Channel channel = ChannelManager.findWebSocketChannel(requestBean.getChannelId()); ResponseBean res = ResponseBean.ok(chat); chat.setTimestamp(System.currentTimeMillis()); res.setType(2); channel.writeAndFlush(NettyTools.webSocketJson(res));