Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
im-pool
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoyanbin
im-pool
Commits
81a75d9a
Commit
81a75d9a
authored
Jan 03, 2023
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
fa87a8b6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
publicApi.go
pool/publicApi.go
+4
-3
No files found.
pool/publicApi.go
View file @
81a75d9a
...
@@ -224,6 +224,7 @@ func (c *Client) Send(msg *SendMsg) error {
...
@@ -224,6 +224,7 @@ func (c *Client) Send(msg *SendMsg) error {
return
errors
.
New
(
"连接ID:"
+
c
.
Id
+
"ws连接己经断开,无法发送消息"
)
return
errors
.
New
(
"连接ID:"
+
c
.
Id
+
"ws连接己经断开,无法发送消息"
)
default
:
default
:
msg
.
ToClientId
=
c
.
Id
msg
.
ToClientId
=
c
.
Id
fmt
.
Println
(
msg
)
c
.
send
(
msg
)
c
.
send
(
msg
)
}
}
return
nil
return
nil
...
@@ -240,7 +241,7 @@ func (c *Client) Close() {
...
@@ -240,7 +241,7 @@ func (c *Client) Close() {
// 在此方法中sendMsg.Channel指定的值不会处理
// 在此方法中sendMsg.Channel指定的值不会处理
func
Send
(
msg
*
SendMsg
)
error
{
func
Send
(
msg
*
SendMsg
)
error
{
//log.Info("发送指令:",msg.Cmd,msg.ToClientId)
//log.Info("发送指令:",msg.Cmd,msg.ToClientId)
fmt
.
Println
(
msg
)
if
msg
.
ToClientId
==
""
{
if
msg
.
ToClientId
==
""
{
return
errors
.
New
(
"发送消息的消息体中未指定ToClient目标!"
)
return
errors
.
New
(
"发送消息的消息体中未指定ToClient目标!"
)
}
}
...
@@ -391,11 +392,11 @@ func SaveMsg(msg *SendMsg) {
...
@@ -391,11 +392,11 @@ func SaveMsg(msg *SendMsg) {
mqData
.
EndTime
=
msg
.
SendTime
mqData
.
EndTime
=
msg
.
SendTime
if
user
.
CustomerType
==
"1"
{
if
user
.
CustomerType
==
"1"
{
mqData
.
Finish
=
"
3
"
mqData
.
Finish
=
"
1
"
}
}
if
user
.
CustomerType
==
"2"
{
if
user
.
CustomerType
==
"2"
{
mqData
.
Finish
=
"
1
"
mqData
.
Finish
=
"
2
"
}
}
}
}
...
...
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