From eca9c361102f7ae49529eabfb5709a3a328ab164 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Mon, 21 Apr 2025 11:09:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Document/SystemDocumentService.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs index 1a0d8070c..4c232f8f2 100644 --- a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs @@ -168,19 +168,18 @@ namespace IRaCIS.Core.Application.Services [HttpPost] public async Task PublishSystemDocument(PublishSystemDocumentInDto inDto) { - await _systemDocumentRepository.UpdatePartialFromQueryAsync(x => inDto.Ids.Contains(x.Id), x => new SystemDocument() + await _systemDocumentRepository.BatchUpdateNoTrackingAsync(x => inDto.Ids.Contains(x.Id), x => new SystemDocument() { IsPublish = true, IsDeleted = false, }); - var result = await _systemDocumentRepository.SaveChangesAsync(); await _mediatorScoped.Publish(new SystemDocumentPublishEvent() { Ids = inDto.Ids }); - return ResponseOutput.Result(result); + return ResponseOutput.Result(true); } ///