fix:修复已知问题

This commit is contained in:
2026-02-09 15:46:40 +08:00
parent 10f79fb537
commit dc6ecf224d
29 changed files with 1530 additions and 37 deletions
@@ -42,7 +42,7 @@ namespace IM_API.Services
var groupList = await (from c in _context.Conversations
join g in _context.Groups on c.TargetId equals g.Id
where c.UserId == userId && c.ChatType == ChatType.GROUP
select new { c, g.Avatar, g.Name })
select new { c, g.Avatar, g.Name,g.MaxSequenceId,g.LastMessage })
.ToListAsync();
var privateDtos = privateList.Select(x =>
@@ -58,6 +58,9 @@ namespace IM_API.Services
var dto = _mapper.Map<ConversationVo>(x.c);
dto.TargetAvatar = x.Avatar;
dto.TargetName = x.Name;
dto.UnreadCount = (int)(x.MaxSequenceId - x.c.LastReadSequenceId ?? 0);
dto.LastSequenceId = x.MaxSequenceId;
dto.LastMessage = x.LastMessage;
return dto;
});