Commit 532558f9 authored by shiyu's avatar shiyu

获取用户签名

parent dfd16a15
......@@ -95,6 +95,7 @@ public class ImServiceImpl implements IMService {
String userSig = tlsSigApi.getUserSig(imUtil.formatUserId(String.valueOf(dto.getUserId())));
Map<String, String> map = new HashMap<>();
map.put("userSig", userSig);
logger.info(">>>>>>>>>>>>> 获取用户签名 userId:{}, userSig:{} <<<<<<<<<<<<<", dto.getUserId(), userSig);
return Result.success(map);
} catch (Exception e) {
logger.error("获取用户签名失败:{}", e);
......
......@@ -90,12 +90,12 @@ public class ChatApiTest {
@Test
public void sendChatMsg() {
SendChatMsgRequestDto sendChatMsgRequestDto = new SendChatMsgRequestDto();
sendChatMsgRequestDto.setToAccount("285");
sendChatMsgRequestDto.setFromAccount("ai10001");
sendChatMsgRequestDto.setToAccount("269");
sendChatMsgRequestDto.setFromAccount("ai10000");
sendChatMsgRequestDto.setMsgType(IMEnum.MsgTypeEnum.TIMTextElem.getCode());
long timestamp = System.currentTimeMillis();
// String msgContent = timestamp + " >> ai测试消息的数据, 是否可以接收到";
String msgContent = "Hi,欢迎来到小藏的世界";
String msgContent = "Hi,欢迎来到老猫的世界";
sendChatMsgRequestDto.setMsgContent(msgContent);
Result<String> result = conversationApi.sendChatMsg(sendChatMsgRequestDto);
String msgKey = result.getData();
......@@ -128,7 +128,7 @@ public class ChatApiTest {
@Test
public void getChatList() {
IMChatRequestDto imChatRequestDto = new IMChatRequestDto();
imChatRequestDto.setUserId(243L);
imChatRequestDto.setUserId(269L);
conversationApi.getChatList(imChatRequestDto);
}
......
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