|
@@ -254,6 +254,18 @@ public class CommunityChatMsgController extends BaseController {
|
|
|
if (returnRecords != null && !returnRecords.isEmpty()) {
|
|
|
List<Long> returnIds = returnRecords.stream().map(CommunityReturnRecord::getId).collect(Collectors.toList());
|
|
|
sysUserChatVos = communityChatMsgService.getChatListWithLatestMessage(userId, "anonymous", searchValue, returnIds);
|
|
|
+ if (!sysUserChatVos.isEmpty()) {
|
|
|
+ for (SysUserVo sysUserChatVo : sysUserChatVos) {
|
|
|
+ CommunityReturnRecord returnRecord = communityReturnRecordService.getOne(new QueryWrapper<CommunityReturnRecord>().eq("id", sysUserChatVo.getReturnRecordId()));
|
|
|
+ if (returnRecord != null) {
|
|
|
+ if (sysUserChatVo.getSenderId().equals(returnRecord.getReturnCreateUserId())) {
|
|
|
+ sysUserChatVo.setSenderNickName(returnRecord.getReturnCreateAnonName());
|
|
|
+ } else {
|
|
|
+ sysUserChatVo.setSenderNickName(returnRecord.getReturnReceiveAnonName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return AjaxResult.success(sysUserChatVos);
|
|
|
}
|