From bb9b1283bfafa3553281a22a68c569b6f18cba7e Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 14 Mar 2025 16:47:39 +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 --- IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs | 6 +++--- .../Service/Doctor/DTO/AttachmentModel.cs | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs b/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs index 0a7e6fa59..beb55f6b1 100644 --- a/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/AttachmentService.cs @@ -163,10 +163,10 @@ namespace IRaCIS.Core.Application.Service /// /// /// - [HttpDelete("{id:guid}")] - public async Task DeleteAttachment(Guid id) + [HttpPost] + public async Task DeleteAttachment(DeleteAttachment inDto) { - var success = await _attachmentrepository.DeleteFromQueryAsync(t => t.Id == id, true); + var success = await _attachmentrepository.DeleteFromQueryAsync(t => inDto.Ids.Contains(t.Id)); return ResponseOutput.Ok(); } diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs index 3c057497c..336a7f51e 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DTO/AttachmentModel.cs @@ -40,6 +40,11 @@ public bool IsAuthorizedView { get; set; } } + public class DeleteAttachment + { + public List Ids { get; set; } + } + public class GetTrialDoctorSelectInDto { public Guid TrialId { get; set; }