修改系统通知
This commit is contained in:
@@ -93,6 +93,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
public async Task<IResponseOutput> DeleteSystemNotice(Guid systemNoticeId)
|
||||
{
|
||||
var success = await _systemNoticeRepository.BatchDeleteNoTrackingAsync(t => t.Id == systemNoticeId);
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
||||
@@ -131,5 +132,15 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
|
||||
|
||||
public async Task<List<SystemNoticeView>> GetUserNoticeList()
|
||||
{
|
||||
var query = _systemNoticeRepository
|
||||
.Where(t => t.NoticeUserTypeList.Any(t => t.UserTypeId == _userInfo.UserTypeId) && t.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && !t.NoticeUserReadList.Any(t => t.CreateUserId == _userInfo.Id))
|
||||
.Where(t=>t.EndDate==null || t.EndDate != null && t.EndDate< DateTime.Now)
|
||||
.ProjectTo<SystemNoticeView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken, userId = _userInfo.Id });
|
||||
|
||||
return await query.ToListAsync();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user