Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
2761ba3a
Commit
2761ba3a
authored
Oct 18, 2021
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化ReadWsData
parent
548b4514
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
common/src/main/java/com/wecloud/im/ws/receive/ReadWsData.java
+3
-5
No files found.
common/src/main/java/com/wecloud/im/ws/receive/ReadWsData.java
View file @
2761ba3a
...
...
@@ -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
().
as
Short
Text
());
",channelId:"
+
ctx
.
channel
().
id
().
as
Long
Text
());
// 解析json
...
...
@@ -53,8 +51,8 @@ public class ReadWsData {
WsRequestCmdEnum
wsRequestUriPathEnum
=
WsRequestCmdEnum
.
getByCode
(
receiveModel
.
getCmd
());
// 使用策略模式, 根据不同类型请求调用不同实现类
ImCmdAbstract
receive
Strategy
=
receiveStrategyContext
.
getStrategy
(
wsRequestUriPathEnum
);
receive
Strategy
.
process
(
receiveModel
,
ctx
,
data
,
appKey
,
clientId
);
ImCmdAbstract
cmd
Strategy
=
receiveStrategyContext
.
getStrategy
(
wsRequestUriPathEnum
);
cmd
Strategy
.
process
(
receiveModel
,
ctx
,
data
,
appKey
,
clientId
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment