From 7e25ed322740ed337296a990bac67e95bc250ac0 Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期四, 30 五月 2024 22:32:43 +0800
Subject: [PATCH] 移出萌妻的类,增加实体查询的api方法

---
 Tiger.Api/Controllers/Base/SystemController.cs |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/Tiger.Api/Controllers/Base/SystemController.cs b/Tiger.Api/Controllers/Base/SystemController.cs
index 583d104..04d0f00 100644
--- a/Tiger.Api/Controllers/Base/SystemController.cs
+++ b/Tiger.Api/Controllers/Base/SystemController.cs
@@ -7,6 +7,7 @@
 using Rhea.Common;
 using Tiger.IBusiness;
 using System.Threading;
+using System.Linq;
 
 namespace Tiger.Api.Controllers.Base
 {
@@ -95,6 +96,26 @@
         }
 
         /// <summary>
+        /// 鑾峰彇Api浜у搧
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        [Route("System/Base/[action]")]
+        public IActionResult GetEntitys()
+        {
+            Assembly assembly = Assembly.Load("Tiger.Model");
+            Type[] types = assembly.GetTypes();
+            var entitys = types.Where(q => q.GetInterfaces().Contains(typeof(Model.iEntity)) && q.IsClass).ToList();
+            var data = entitys.Select(q => new
+            {
+                q.Namespace,
+                q.FullName,
+                Properties = q.GetProperties().Select(p => new { p.Name, Type = p.PropertyType.Name }).ToList()
+            });
+            return Ok(data);
+        }
+
+        /// <summary>
         /// GetCertification(ApiAction)
         /// 鍦ㄦ敞鍐岃〃HKEY_LOCAL_MACHINE\SOFTWARE\TigerClouds鑺傜偣涓鍙栧瘑閽ヨ瘉涔�
         /// </summary>

--
Gitblit v1.9.3