Commit d85a8d41 authored by shiyu's avatar shiyu

消息发送加入reqId

parent 9fe2050a
...@@ -156,6 +156,7 @@ public class ImServiceImpl implements IMService { ...@@ -156,6 +156,7 @@ public class ImServiceImpl implements IMService {
answerDto.setToAccount(dto.getFromAccount()); answerDto.setToAccount(dto.getFromAccount());
answerDto.setMsgType(IMEnum.MsgTypeEnum.TIMTextElem.getCode()); answerDto.setMsgType(IMEnum.MsgTypeEnum.TIMTextElem.getCode());
answerDto.setMsgContent(answer); answerDto.setMsgContent(answer);
answerDto.setReqId(dto.getReqId());
//判断该AI回答是否已被停止 //判断该AI回答是否已被停止
if (redisUtils.hasKey(dto.getReqId())){ if (redisUtils.hasKey(dto.getReqId())){
......
...@@ -133,7 +133,7 @@ public class ChatApiTest { ...@@ -133,7 +133,7 @@ public class ChatApiTest {
sendChatMsgRequestDto.setMsgType(IMEnum.MsgTypeEnum.TIMTextElem.getCode()); sendChatMsgRequestDto.setMsgType(IMEnum.MsgTypeEnum.TIMTextElem.getCode());
sendChatMsgRequestDto.setReqId("12123123122223"); sendChatMsgRequestDto.setReqId("12123123122223");
long timestamp = System.currentTimeMillis(); long timestamp = System.currentTimeMillis();
String msgContent = "什么是袁大头"; String msgContent = "什么是袁大头 ";
// String msgContent = "Hi,欢迎来到老猫的世界"; // String msgContent = "Hi,欢迎来到老猫的世界";
sendChatMsgRequestDto.setMsgContent(msgContent); sendChatMsgRequestDto.setMsgContent(msgContent);
Result<String> result = imService.sendAiChatMsg(sendChatMsgRequestDto); Result<String> result = imService.sendAiChatMsg(sendChatMsgRequestDto);
......
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