|
@@ -1,5 +1,6 @@
|
|
|
package com.citu.module.menduner.im.service.wukong;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.citu.framework.common.pojo.CommonResult;
|
|
|
import com.citu.module.menduner.im.controller.app.base.user.ImUserInfoVo;
|
|
|
import com.citu.module.menduner.im.controller.app.base.user.ImUserResoVO;
|
|
@@ -32,14 +33,11 @@ public class WuKongSessionServiceImpl implements WuKongSessionService{
|
|
|
conversationSyncRespVo.getRecents().forEach(item->uids.add(item.get("from_uid").toString()));
|
|
|
}
|
|
|
Map<String, ImUserInfoVo> imUserInfoVoMap = userService.getUserByUids(uids).getData().stream().collect(Collectors.toMap(item -> item.getUid(), item -> item));
|
|
|
+ System.out.println(JSON.toJSONString(imUserInfoVoMap));
|
|
|
for (ConversationSyncRespVo conversationSyncRespVo : conversationSyncRespVos) {
|
|
|
- String fromUid = null;
|
|
|
- for (Map recent : conversationSyncRespVo.getRecents()) {
|
|
|
- fromUid = recent.get("channel_id").toString();
|
|
|
- if(!uid.equals(fromUid)){
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
+ String fromUid = conversationSyncRespVo.getChannelId().toString();
|
|
|
+
|
|
|
+
|
|
|
conversationSyncRespVo.setUserInfoVo(imUserInfoVoMap.get(fromUid));
|
|
|
}
|
|
|
|