Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
532558f9
Commit
532558f9
authored
Oct 25, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取用户签名
parent
dfd16a15
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ImServiceImpl.java
...-api/src/main/java/com/wwdz/ch/wx/impl/ImServiceImpl.java
+1
-0
ch-wx-api/src/test/java/com/wwdz/ch/wx/api/ChatApiTest.java
ch-wx-api/src/test/java/com/wwdz/ch/wx/api/ChatApiTest.java
+4
-4
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ImServiceImpl.java
View file @
532558f9
...
@@ -95,6 +95,7 @@ public class ImServiceImpl implements IMService {
...
@@ -95,6 +95,7 @@ public class ImServiceImpl implements IMService {
String
userSig
=
tlsSigApi
.
getUserSig
(
imUtil
.
formatUserId
(
String
.
valueOf
(
dto
.
getUserId
())));
String
userSig
=
tlsSigApi
.
getUserSig
(
imUtil
.
formatUserId
(
String
.
valueOf
(
dto
.
getUserId
())));
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"userSig"
,
userSig
);
map
.
put
(
"userSig"
,
userSig
);
logger
.
info
(
">>>>>>>>>>>>> 获取用户签名 userId:{}, userSig:{} <<<<<<<<<<<<<"
,
dto
.
getUserId
(),
userSig
);
return
Result
.
success
(
map
);
return
Result
.
success
(
map
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"获取用户签名失败:{}"
,
e
);
logger
.
error
(
"获取用户签名失败:{}"
,
e
);
...
...
ch-wx-api/src/test/java/com/wwdz/ch/wx/api/ChatApiTest.java
View file @
532558f9
...
@@ -90,12 +90,12 @@ public class ChatApiTest {
...
@@ -90,12 +90,12 @@ public class ChatApiTest {
@Test
@Test
public
void
sendChatMsg
()
{
public
void
sendChatMsg
()
{
SendChatMsgRequestDto
sendChatMsgRequestDto
=
new
SendChatMsgRequestDto
();
SendChatMsgRequestDto
sendChatMsgRequestDto
=
new
SendChatMsgRequestDto
();
sendChatMsgRequestDto
.
setToAccount
(
"2
85
"
);
sendChatMsgRequestDto
.
setToAccount
(
"2
69
"
);
sendChatMsgRequestDto
.
setFromAccount
(
"ai1000
1
"
);
sendChatMsgRequestDto
.
setFromAccount
(
"ai1000
0
"
);
sendChatMsgRequestDto
.
setMsgType
(
IMEnum
.
MsgTypeEnum
.
TIMTextElem
.
getCode
());
sendChatMsgRequestDto
.
setMsgType
(
IMEnum
.
MsgTypeEnum
.
TIMTextElem
.
getCode
());
long
timestamp
=
System
.
currentTimeMillis
();
long
timestamp
=
System
.
currentTimeMillis
();
// String msgContent = timestamp + " >> ai测试消息的数据, 是否可以接收到";
// String msgContent = timestamp + " >> ai测试消息的数据, 是否可以接收到";
String
msgContent
=
"Hi,欢迎来到
小藏
的世界"
;
String
msgContent
=
"Hi,欢迎来到
老猫
的世界"
;
sendChatMsgRequestDto
.
setMsgContent
(
msgContent
);
sendChatMsgRequestDto
.
setMsgContent
(
msgContent
);
Result
<
String
>
result
=
conversationApi
.
sendChatMsg
(
sendChatMsgRequestDto
);
Result
<
String
>
result
=
conversationApi
.
sendChatMsg
(
sendChatMsgRequestDto
);
String
msgKey
=
result
.
getData
();
String
msgKey
=
result
.
getData
();
...
@@ -128,7 +128,7 @@ public class ChatApiTest {
...
@@ -128,7 +128,7 @@ public class ChatApiTest {
@Test
@Test
public
void
getChatList
()
{
public
void
getChatList
()
{
IMChatRequestDto
imChatRequestDto
=
new
IMChatRequestDto
();
IMChatRequestDto
imChatRequestDto
=
new
IMChatRequestDto
();
imChatRequestDto
.
setUserId
(
2
43
L
);
imChatRequestDto
.
setUserId
(
2
69
L
);
conversationApi
.
getChatList
(
imChatRequestDto
);
conversationApi
.
getChatList
(
imChatRequestDto
);
}
}
...
...
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