优化查询结果

This commit is contained in:
wangxulei 2025-02-19 15:05:49 +08:00
parent be5e7a015a
commit 4be98ce412
2 changed files with 11 additions and 3 deletions

View File

@ -68,9 +68,13 @@ public class ChatController {
public ResultBean<List<AuthorChat>> authorList(String authorId) { public ResultBean<List<AuthorChat>> authorList(String authorId) {
List<AuthorChat> authorChats = chatService.selectAuthorChatList(authorId); List<AuthorChat> authorChats = chatService.selectAuthorChatList(authorId);
authorChats.stream().forEach(authorChat -> { authorChats.stream().forEach(authorChat -> {
authorChat.setIndex(String.valueOf(PinyinUtil.getFirstLetter(authorChat.getIndex().charAt(0)))); try {
if(authorChat.getCreateTime()!=null){ authorChat.setIndex(String.valueOf(PinyinUtil.getFirstLetter(authorChat.getIndex().charAt(0))));
authorChat.setLastSendTime(convertToShanghaiTimeZoneTimestamp( authorChat.getCreateTime())); if(authorChat.getCreateTime()!=null){
authorChat.setLastSendTime(convertToShanghaiTimeZoneTimestamp( authorChat.getCreateTime()));
}
}catch (Exception e){
} }
}); });
return ResultBean.success(authorChats); return ResultBean.success(authorChats);

View File

@ -33,9 +33,13 @@
</el-dropdown> </el-dropdown>
</div> </div>
<div style="position: absolute;left: 50%;line-height: 50px;font-size: 16px;">
qq讨论群:149100946 &nbsp;&nbsp;&nbsp; wx:15638206428
</div>
<div class="right-menu" style="margin-right: 20px;"> <div class="right-menu" style="margin-right: 20px;">
<div class="top-icon" @click="openIm"> <div class="top-icon" @click="openIm">
<el-badge v-show="unReadCount>0" :value="unReadCount" :max="99" > <el-badge v-show="unReadCount>0" :value="unReadCount" :max="99" >
客服消息 客服消息
<i class="el-icon-bell"></i> <i class="el-icon-bell"></i>