|
@@ -96,7 +96,6 @@ public class CommunityChatMsgController extends BaseController {
|
|
communityChatMsgService.update(new UpdateWrapper<CommunityChatMsg>().in("id", msgId).set("receiver_is_read", true));
|
|
communityChatMsgService.update(new UpdateWrapper<CommunityChatMsg>().in("id", msgId).set("receiver_is_read", true));
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
CommunityChatMsgVo chatMsgVo = null;
|
|
CommunityChatMsgVo chatMsgVo = null;
|
|
for (CommunityChatMsg chatMsg : chatMsgList) {
|
|
for (CommunityChatMsg chatMsg : chatMsgList) {
|
|
chatMsgVo = new CommunityChatMsgVo();
|
|
chatMsgVo = new CommunityChatMsgVo();
|
|
@@ -111,7 +110,20 @@ public class CommunityChatMsgController extends BaseController {
|
|
}
|
|
}
|
|
chatMsgVo.setSenderNickName(senderUser.getNickName());
|
|
chatMsgVo.setSenderNickName(senderUser.getNickName());
|
|
chatMsgVo.setSenderAvatar(senderUser.getAvatar());
|
|
chatMsgVo.setSenderAvatar(senderUser.getAvatar());
|
|
- chatMsgVo.setReceiverNickName("chat".equals(chatMsg.getType()) ? receiveUser.getNickName() : chatMsg.getReceiverAnonName());
|
|
|
|
|
|
+ if ("anonymous".equals(type)) {
|
|
|
|
+ CommunityReturnRecord returnRecord = communityReturnRecordService.getOne(new QueryWrapper<CommunityReturnRecord>()
|
|
|
|
+ .eq("id", chatMsg.getReturnRecordId())
|
|
|
|
+ .eq("is_delete", false));
|
|
|
|
+ if (returnRecord.getReturnCreateUserId().equals(chatMsgVo.getSenderId())) {
|
|
|
|
+ chatMsgVo.setSenderAnonName(returnRecord.getReturnCreateAnonName());
|
|
|
|
+ chatMsgVo.setReceiverAnonName(returnRecord.getReturnReceiveAnonName());
|
|
|
|
+ } else {
|
|
|
|
+ chatMsgVo.setSenderAnonName(returnRecord.getReturnReceiveAnonName());
|
|
|
|
+ chatMsgVo.setReceiverAnonName(returnRecord.getReturnCreateAnonName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ chatMsgVo.setReceiverNickName(receiveUser.getNickName());
|
|
chatMsgVo.setReceiverAvatar(receiveUser.getAvatar());
|
|
chatMsgVo.setReceiverAvatar(receiveUser.getAvatar());
|
|
chatMsgVos.add(chatMsgVo);
|
|
chatMsgVos.add(chatMsgVo);
|
|
}
|
|
}
|
|
@@ -119,8 +131,6 @@ public class CommunityChatMsgController extends BaseController {
|
|
System.out.println(e.getMessage());
|
|
System.out.println(e.getMessage());
|
|
throw new ProjectException();
|
|
throw new ProjectException();
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
return AjaxResult.success(chatMsgVos);
|
|
return AjaxResult.success(chatMsgVos);
|
|
}
|
|
}
|
|
|
|
|