修改通知
parent
bacc6bb24a
commit
fd380ce430
|
@ -55,7 +55,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
entity.PublishedUserId = _userInfo.Id;
|
||||
entity.PublishedTime = DateTime.Now;
|
||||
}
|
||||
_systemNoticeRepository.SaveChangesAsync();
|
||||
await _systemNoticeRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
@ -64,8 +64,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
var systemNotice = await _systemNoticeRepository.Where(t => t.Id == addOrEditSystemNotice.Id, true, true).Include(t => t.NoticeUserTypeList).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
_mapper.Map(addOrEditSystemNotice, systemNotice);
|
||||
|
||||
if (addOrEditSystemNotice.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.HavePublished && systemNotice.NoticeStateEnum == Domain.Share.Management.SystemNotice_NoticeStateEnum.NotPublish)
|
||||
{
|
||||
systemNotice.PublishedUserId = _userInfo.Id;
|
||||
|
@ -77,6 +75,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
systemNotice.PublishedTime = null;
|
||||
}
|
||||
|
||||
_mapper.Map(addOrEditSystemNotice, systemNotice);
|
||||
|
||||
|
||||
await _systemNoticeRepository.SaveChangesAsync();
|
||||
|
||||
|
|
Loading…
Reference in New Issue