优化查询结果
This commit is contained in:
@@ -68,9 +68,13 @@ public class ChatController {
|
||||
public ResultBean<List<AuthorChat>> authorList(String authorId) {
|
||||
List<AuthorChat> authorChats = chatService.selectAuthorChatList(authorId);
|
||||
authorChats.stream().forEach(authorChat -> {
|
||||
authorChat.setIndex(String.valueOf(PinyinUtil.getFirstLetter(authorChat.getIndex().charAt(0))));
|
||||
if(authorChat.getCreateTime()!=null){
|
||||
authorChat.setLastSendTime(convertToShanghaiTimeZoneTimestamp( authorChat.getCreateTime()));
|
||||
try {
|
||||
authorChat.setIndex(String.valueOf(PinyinUtil.getFirstLetter(authorChat.getIndex().charAt(0))));
|
||||
if(authorChat.getCreateTime()!=null){
|
||||
authorChat.setLastSendTime(convertToShanghaiTimeZoneTimestamp( authorChat.getCreateTime()));
|
||||
}
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
});
|
||||
return ResultBean.success(authorChats);
|
||||
|
Reference in New Issue
Block a user