Merge branch 'develop' into working
This commit is contained in:
commit
dc1a29d861
3 changed files with 137 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ namespace BMA.EHR.Application.Repositories.MessageQueue
|
|||
|
||||
var data = await _dbContext.Set<Notification>()
|
||||
.Where(x => x.ReceiverUserId == profile.Id)
|
||||
.Where(x => x.IsOpen == false)
|
||||
.OrderByDescending(x => x.ReceiveDate)
|
||||
.Select(x => new NotificationResponse
|
||||
{
|
||||
|
|
@ -69,6 +70,26 @@ namespace BMA.EHR.Application.Repositories.MessageQueue
|
|||
}
|
||||
}
|
||||
|
||||
public async Task DeleteMyNotificationAsync(Guid id)
|
||||
{
|
||||
try
|
||||
{
|
||||
var notification = await _dbContext.Set<Notification>()
|
||||
.FirstOrDefaultAsync(p => p.Id == id);
|
||||
|
||||
if (notification != null)
|
||||
{
|
||||
notification.IsOpen = true;
|
||||
// _dbContext.Set<Notification>().Remove(notification);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task PushNotificationAsync(Guid ReceiverUserId, string Subject, string Body, string Payload = "", bool IsSendInbox = false, bool IsSendMail = false)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue