|
|
@ -140,7 +140,7 @@ namespace GDZZ.Application
|
|
|
|
Id = item.FriendID,
|
|
|
|
Id = item.FriendID,
|
|
|
|
Index = sysUser.Name.Substring(0, 1),
|
|
|
|
Index = sysUser.Name.Substring(0, 1),
|
|
|
|
LastSendTime = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000,
|
|
|
|
LastSendTime = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000,
|
|
|
|
Unread = 0
|
|
|
|
Unread = await this.cacheService.GetUnreadAsync(UserManager.UserId)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//查询聊天记录
|
|
|
|
//查询聊天记录
|
|
|
@ -203,7 +203,10 @@ namespace GDZZ.Application
|
|
|
|
id = UserManager.UserId
|
|
|
|
id = UserManager.UserId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
await this.cacheService.SetUnreadAsync(UserManager.UserId);
|
|
|
|
|
|
|
|
await this.cacheService.SetUnreadAsync(entity.OtherUserID);
|
|
|
|
var livejson = livemes.ToJsonString();
|
|
|
|
var livejson = livemes.ToJsonString();
|
|
|
|
|
|
|
|
|
|
|
|
await _chatHubContext.Clients.Client(user.ConnectionId).SendMessage(livejson, "SendMessage");
|
|
|
|
await _chatHubContext.Clients.Client(user.ConnectionId).SendMessage(livejson, "SendMessage");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|