From 6cd8d2081dee04161d09079a19448f64230b619a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 18 May 2022 18:28:43 +0800 Subject: [PATCH] xx --- .../Service/Management/SystemNoticeService.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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();