From 7e5ae19df4bf44562842189b3578d5950aca3c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E9=BE=99=20=E7=8E=8B?= Date: Thu, 21 Nov 2024 18:00:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=BD=A8=E8=BF=B9=E4=B8=AD=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E8=BD=A8=E8=BF=B9=E5=88=97=E8=A1=A8=E4=B8=AD=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E3=80=90=E4=B8=8D=E5=85=81=E8=AE=B8=E9=87=8D=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E3=80=90=E4=B8=8D=E5=85=81=E8=AE=B8=E6=89=8B=E5=8A=A8=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E3=80=91=E7=9A=84=E8=BD=A8=E8=BF=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dtos/TrackContents/GetAvailableContentInput.cs | 5 +++-- .../Services/TrackContents/TrackContentService.cs | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentInput.cs b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentInput.cs index fb6aa163..47425b3c 100644 --- a/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentInput.cs +++ b/src/SJZY.Track.Application.Contract/Dtos/TrackContents/GetAvailableContentInput.cs @@ -13,7 +13,7 @@ public class GetAvailableContentInput public string? OrderNo { get; set; } /// - /// 操作类型 1=创建 2=修改 + /// 操作类型 1=创建 2=修改 3=删除 /// public TrackOptionType TrackOptionType { get; set; } } @@ -21,5 +21,6 @@ public class GetAvailableContentInput public enum TrackOptionType { 创建 = 1, - 修改 = 2 + 修改 = 2, + 删除 = 3 } diff --git a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs index 8cb91e48..bdc6edab 100644 --- a/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs +++ b/src/SJZY.Track.Application/Services/TrackContents/TrackContentService.cs @@ -269,6 +269,12 @@ public class TrackContentService : ApplicationService if (!item.IsAllowManuallyUpdate && input.TrackOptionType == TrackOptionType.修改) //跳过不允许手动创建的轨迹内容 continue; + if (!item.IsRepeatable && input.TrackOptionType == TrackOptionType.删除) //删除操作中跳过不重复的轨迹内容 + continue; + + if (!item.IsAllowManuallyCreate && input.TrackOptionType == TrackOptionType.删除) //删除操作中跳过不允许手动创建的轨迹内容 + continue; + res.Data.Add(new GetAvailableContentOutput() { IsExternal = item.IsExternal,