diff --git a/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs b/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs index 654f47d7e..83aa3aa1c 100644 --- a/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs +++ b/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs @@ -64,11 +64,6 @@ namespace IRaCIS.Core.Application.Service { var systemNotice = (await _systemNoticeRepository.Where(t => t.Id == addOrEditSystemNotice.Id, true, true).Include(t => t.NoticeUserTypeList).FirstOrDefaultAsync()).IfNullThrowException(); - - - - _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; @@ -81,6 +76,10 @@ namespace IRaCIS.Core.Application.Service } + + _mapper.Map(addOrEditSystemNotice, systemNotice); + + await _systemNoticeRepository.SaveChangesAsync(); return ResponseOutput.Ok();