This commit is contained in:
zt
2025-09-10 20:21:01 +08:00
parent 2c45762c66
commit a8cb16ab3f
2 changed files with 11 additions and 0 deletions

View File

@ -175,6 +175,15 @@ public class ChatGroupController {
byId.setAvatar(null);
}
}
LambdaQueryWrapper<ChatHistory> historyLambdaQueryWrapper = new LambdaQueryWrapper<>();
historyLambdaQueryWrapper.eq(ChatHistory::getGeterId, byId.getId());
historyLambdaQueryWrapper.ne(ChatHistory::getSenderId, userId);
historyLambdaQueryWrapper.eq(ChatHistory::getIsRead, "1");
List<ChatHistory> list = chatHistoryService.list(historyLambdaQueryWrapper);
byId.setUnReadCount(list.size());
}
}

View File

@ -45,4 +45,6 @@ public class ChatGroup implements Serializable {
private String isShowOut;
@TableField(exist = false)
private Integer unReadCount;
}