Notice 再次提交
This commit is contained in:
@@ -34,6 +34,7 @@ namespace Ewide.Core.Extension.DataFilter.Entity
|
||||
/// <param name="filterFields"></param>
|
||||
public void SetSearchInfo(SearchInfo[] searchInfo, IEnumerable<string> filterFields)
|
||||
{
|
||||
if (searchInfo == null) return;
|
||||
try
|
||||
{
|
||||
foreach (var elem in searchInfo)
|
||||
|
||||
@@ -232,7 +232,7 @@ WHERE SNU.UserId = @UserId AND SN.Status = @Status";
|
||||
},
|
||||
new[]
|
||||
{
|
||||
"Type","Title"
|
||||
"Type","Title","ReadStatus"
|
||||
}
|
||||
);
|
||||
|
||||
@@ -254,8 +254,10 @@ WHERE SNU.UserId = @UserId AND SN.Status = @Status";
|
||||
[HttpGet("/sysNotice/unread")]
|
||||
public async Task<int> GetUnreadCount()
|
||||
{
|
||||
var noticeList = await _sysNoticeRep.Where(u => u.Status != (int)NoticeStatus.DELETED).Select(s => s.Id).ToListAsync();
|
||||
return await _sysNoticeUserRep.Where(u => u.UserId == _userManager.UserId && noticeList.Contains(u.NoticeId) && u.ReadStatus == (int)NoticeUserStatus.UNREAD).CountAsync();
|
||||
//删除 或者 草稿都不让显示
|
||||
var noticeList = await _sysNoticeRep.Where(u => u.Status != (int)NoticeStatus.DELETED&& u.Status != (int)NoticeStatus.DRAFT).Select(s => s.Id).ToListAsync();
|
||||
var noticeUserList = await _sysNoticeUserRep.Where(u => u.UserId == _userManager.UserId && noticeList.Contains(u.NoticeId) && u.ReadStatus == (int)NoticeUserStatus.UNREAD).ToListAsync();
|
||||
return noticeUserList.Count();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user