|
|
@ -78,17 +78,13 @@ namespace GDZZ.Application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 修改消息条数
|
|
|
|
/// 修改未读消息
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPut("/Mini/LiveHistoryContacts/UPLive")]
|
|
|
|
[HttpPut("/Mini/LiveHistoryContacts/UPLive")]
|
|
|
|
public async Task UPLive(UpdateLiveHistoryContactsInput input)
|
|
|
|
public async Task UPLive(UpdateLiveHistoryContactsInput input)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
this.cacheService.UpUnreadAsync(input.Id);
|
|
|
|
|
|
|
|
|
|
|
|
var entity = input.Adapt<LiveHistoryContacts>();
|
|
|
|
|
|
|
|
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
await this.cacheService.DelLiveHistoryService(UserManager.UserId);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -149,8 +145,18 @@ namespace GDZZ.Application
|
|
|
|
|
|
|
|
|
|
|
|
if (live != null)
|
|
|
|
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.LastSendTime = (live.SendTime.ToUniversalTime().Ticks - 621355968000000000) / 10000;
|
|
|
|
liveHis.LastSendTimeData = live.SendTime;
|
|
|
|
|
|
|
|
liveHis.LastContent = live.Content;
|
|
|
|
liveHis.LastContent = live.Content;
|
|
|
|
liveHis.Type = live.Type;
|
|
|
|
liveHis.Type = live.Type;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -203,8 +209,8 @@ namespace GDZZ.Application
|
|
|
|
id = UserManager.UserId
|
|
|
|
id = UserManager.UserId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
await this.cacheService.SetUnreadAsync(UserManager.UserId);
|
|
|
|
//await this.cacheService.SetUnreadAsync(UserManager.UserId);
|
|
|
|
await this.cacheService.SetUnreadAsync(entity.OtherUserID);
|
|
|
|
//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");
|
|
|
|