From fd380ce430fa77c4f217fb981271bf6e8210019a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 28 Apr 2022 16:23:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/SystemNoticeService.cs | 6 +++--- IRaCIS.Core.Application/TestService.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs b/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs index 2f1d0abe3..985cfe65a 100644 --- a/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs +++ b/IRaCIS.Core.Application/Service/Management/SystemNoticeService.cs @@ -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(); diff --git a/IRaCIS.Core.Application/TestService.cs b/IRaCIS.Core.Application/TestService.cs index 5bc29cbc4..9f39b7317 100644 --- a/IRaCIS.Core.Application/TestService.cs +++ b/IRaCIS.Core.Application/TestService.cs @@ -23,7 +23,7 @@ namespace IRaCIS.Application.Services public string Get(testModel testModel) { - var tt= _dicRepository.UpdateFromQueryAsync(Guid.Parse("e2b97a6c-35a6-4aa3-7f27-08da13ab33ff"), t => new Dictionary() { Description = "xxxxx" }, true).Result; + var tt= _dicRepository.UpdateFromQueryAsync(Guid.Parse("e2b97a6c-35a6-4aa3-7f27-08da13ab33ff"), t => new Dictionary() { Description = "xxxxx"}, true).Result; //var d = _repository.Where(t => t.FullName.Contains("cc")).Select(t => t.FullName).FirstOrDefault();