From 7410b9434e5f62ce74333f4faac22f914cdf9025 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Thu, 5 Sep 2024 15:55:00 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=8E=E4=BF=AE=E5=A4=8D=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=99=A8=E8=8E=B7=E5=8F=96=E6=8F=8F=E8=BF=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.NET/Admin.NET.Core/Service/Common/SysCommonService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Admin.NET/Admin.NET.Core/Service/Common/SysCommonService.cs b/Admin.NET/Admin.NET.Core/Service/Common/SysCommonService.cs index d75025dc..87e4845b 100644 --- a/Admin.NET/Admin.NET.Core/Service/Common/SysCommonService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Common/SysCommonService.cs @@ -101,12 +101,13 @@ public class SysCommonService : IDynamicApiController, ITransient continue; var apiDescription = controllerActionDescriptor.ControllerTypeInfo.GetCustomAttribute(true); var controllerName = controllerActionDescriptor.ControllerName; + var controllerText = apiDescription?.Description; if (!apiOuput.Children.Exists(u => u.Name == controllerName)) { apiOuput.Children.Add(new ApiOutput { Name = controllerName, - Text = apiDescription.Description, + Text = string.IsNullOrWhiteSpace(controllerText) ? controllerName : controllerText, Route = "", Order = apiDescription?.Order ?? 0, });