|
|
|
@ -78,17 +78,13 @@ namespace GDZZ.Application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 修改消息条数
|
|
|
|
|
/// 修改未读消息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPut("/Mini/LiveHistoryContacts/UPLive")]
|
|
|
|
|
public async Task UPLive(UpdateLiveHistoryContactsInput input)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var entity = input.Adapt<LiveHistoryContacts>();
|
|
|
|
|
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
|
|
|
|
await this.cacheService.DelLiveHistoryService(UserManager.UserId);
|
|
|
|
|
this.cacheService.UpUnreadAsync(input.Id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -149,8 +145,18 @@ namespace GDZZ.Application
|
|
|
|
|
|
|
|
|
|
if (live != null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var isNow = Utils.ShowHelp(live.SendTime);
|
|
|
|
|
if (isNow)
|
|
|
|
|
{
|
|
|
|
|
liveHis.LastSendTimeData = live.SendTime.ToString("HH:mm:ss");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
liveHis.LastSendTimeData = live.SendTime.ToString("yyyy/MM/dd");
|
|
|
|
|
}
|
|
|
|
|
liveHis.LastSendTime = (live.SendTime.ToUniversalTime().Ticks - 621355968000000000) / 10000;
|
|
|
|
|
liveHis.LastSendTimeData = live.SendTime;
|
|
|
|
|
|
|
|
|
|
liveHis.LastContent = live.Content;
|
|
|
|
|
liveHis.Type = live.Type;
|
|
|
|
|
}
|
|
|
|
@ -203,8 +209,8 @@ namespace GDZZ.Application
|
|
|
|
|
id = UserManager.UserId
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
await this.cacheService.SetUnreadAsync(UserManager.UserId);
|
|
|
|
|
await this.cacheService.SetUnreadAsync(entity.OtherUserID);
|
|
|
|
|
//await this.cacheService.SetUnreadAsync(UserManager.UserId);
|
|
|
|
|
//await this.cacheService.SetUnreadAsync(entity.OtherUserID);
|
|
|
|
|
var livejson = livemes.ToJsonString();
|
|
|
|
|
|
|
|
|
|
await _chatHubContext.Clients.Client(user.ConnectionId).SendMessage(livejson, "SendMessage");
|
|
|
|
|