Commit 2761ba3a by giaogiao

优化ReadWsData

parent 548b4514
......@@ -23,8 +23,6 @@ import javax.annotation.Resource;
public class ReadWsData {
private static final Logger log = LoggerFactory.getLogger(ReadWsData.class);
// idea此处报红 属于正常
// @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
@Resource
private ImCmdContext receiveStrategyContext;
......@@ -41,7 +39,7 @@ public class ReadWsData {
public void convertModel(String data, ChannelHandlerContext ctx, String appKey, String clientId) throws Exception {
log.info("appWS收到data:" + data + "\nappKey+clientId:" + appKey + ":" + clientId +
",channelId:" + ctx.channel().id().asShortText());
",channelId:" + ctx.channel().id().asLongText());
// 解析json
......@@ -53,8 +51,8 @@ public class ReadWsData {
WsRequestCmdEnum wsRequestUriPathEnum = WsRequestCmdEnum.getByCode(receiveModel.getCmd());
// 使用策略模式, 根据不同类型请求调用不同实现类
ImCmdAbstract receiveStrategy = receiveStrategyContext.getStrategy(wsRequestUriPathEnum);
receiveStrategy.process(receiveModel, ctx, data, appKey, clientId);
ImCmdAbstract cmdStrategy = receiveStrategyContext.getStrategy(wsRequestUriPathEnum);
cmdStrategy.process(receiveModel, ctx, data, appKey, clientId);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment