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
b108356c
Commit
b108356c
authored
Nov 09, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断是否存在
parent
9f84ab0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
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
-1
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 @
b108356c
...
...
@@ -127,7 +127,7 @@ public class ImServiceImpl implements IMService {
return
askResult
;
}
//创建会话,先判断是否存在对话
boolean
isExisted
=
conversationDao
.
isExisted
(
dto
.
getFromAccount
(),
dto
.
getToAccount
(
));
boolean
isExisted
=
conversationDao
.
isExisted
(
imUtil
.
revertAppletUserId
(
dto
.
getFromAccount
()),
imUtil
.
revertAppletUserId
(
dto
.
getToAccount
()
));
if
(!
isExisted
)
{
Conversation
conversation
=
new
Conversation
();
conversation
.
setFromAccount
(
imUtil
.
revertAppletUserId
(
dto
.
getFromAccount
()));
...
...
ch-wx-api/src/test/java/com/wwdz/ch/wx/api/ChatApiTest.java
View file @
b108356c
...
...
@@ -128,12 +128,12 @@ public class ChatApiTest {
@Test
public
void
sendAiChatMsg
()
{
SendChatMsgRequestDto
sendChatMsgRequestDto
=
new
SendChatMsgRequestDto
();
sendChatMsgRequestDto
.
setToAccount
(
"ai1000
0
"
);
sendChatMsgRequestDto
.
setFromAccount
(
"2
51
"
);
sendChatMsgRequestDto
.
setToAccount
(
"ai1000
1
"
);
sendChatMsgRequestDto
.
setFromAccount
(
"2
69
"
);
sendChatMsgRequestDto
.
setMsgType
(
IMEnum
.
MsgTypeEnum
.
TIMTextElem
.
getCode
());
sendChatMsgRequestDto
.
setReqId
(
"12123123123"
);
sendChatMsgRequestDto
.
setReqId
(
"1212312312
222
3"
);
long
timestamp
=
System
.
currentTimeMillis
();
String
msgContent
=
"什么是
站洋
"
;
String
msgContent
=
"什么是
袁大头
"
;
// String msgContent = "Hi,欢迎来到老猫的世界";
sendChatMsgRequestDto
.
setMsgContent
(
msgContent
);
Result
<
String
>
result
=
imService
.
sendAiChatMsg
(
sendChatMsgRequestDto
);
...
...
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