using SWS.CAD.Models;
using SWS.CAD.Models.NoEntity;
using SWS.Commons;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using System.Windows.Markup;
namespace SWS.CAD.Services
{
public class NotificationService : HttpService
{
public NotificationService() : base()
{
}
///
///
///
/// 0接收到的信息,1发出去的信息
///
public async Task> GetUserAllNotification(int mode = 0)
{
var projectid = GlobalObject.curProject == null ? "" : GlobalObject.curProject.ProjectId;
var res = await this.GetAsync>($"NotificationApi/GetUserAllNotification?ProjectId={projectid}&User={GlobalObject.userInfo.account}&mode={mode}");
if (res.code == 200)
{
if (res.data == null)
{ return new List(); }
//res.data = res.data.Where(x => x.RetrieveUserID.ToUpper() != x.SenderUserID.ToUpper()).ToList();
return res.data;
}
else
{
}
return new List(); ;
}
#region 提交已读
///
/// 提交已读
///
///
///
public async Task SubmitUnread(string IDs)
{
var res = await this.GetAsync