Sfoglia il codice sorgente

接口编辑增加接口参数字段

lichunlei 8 mesi fa
parent
commit
4f1bdf34b4
2 ha cambiato i file con 82 aggiunte e 2 eliminazioni
  1. 2 2
      Controllers/Admin/ApiInfoController.cs
  2. 80 0
      Model/Dto/Admin/AddApiInfoDto.cs

+ 2 - 2
Controllers/Admin/ApiInfoController.cs

@@ -67,7 +67,7 @@ namespace Controllers.Admin
         /// <returns>添加</returns>
         [HttpPost]
         [Route("/v1/omega_source/ApiInfo/addApiInfo")]
-        public IActionResult addApiInfo([FromBody] ApiInfo param)
+        public IActionResult addApiInfo([FromBody] AddApiInfoDto param)
         {
             var modal = param.Adapt<ApiInfo>().ToCreate(HttpContext);
             var response = _ApiInfoService.InsertReturnIdentity(modal);
@@ -82,7 +82,7 @@ namespace Controllers.Admin
         /// <returns>修改</returns>
         [HttpPut]
         [Route("/v1/omega_source/ApiInfo/updateApiInfo")]
-        public IActionResult updateApiInfo([FromBody] ApiInfo param)
+        public IActionResult updateApiInfo([FromBody] AddApiInfoDto param)
         {
             var modal = param.Adapt<ApiInfo>().ToCreate(HttpContext);
             var response = _ApiInfoService.Update(modal, true);

+ 80 - 0
Model/Dto/Admin/AddApiInfoDto.cs

@@ -0,0 +1,80 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using Model.Base;
+
+namespace Dto.Admin
+{
+    /// <summary>
+    /// 添加
+    /// </summary>
+    public class AddApiInfoDto
+    {
+        /// <summary>
+        /// ID
+        /// </summary>
+        public int id { get; set; }
+
+
+        /// <summary>
+        /// 服务ID
+        /// </summary>
+        public int serviceId { get; set; }
+
+
+        /// <summary>
+        /// 接口分组ID
+        /// </summary>
+        public int groupId { get; set; }
+
+
+        /// <summary>
+        /// 板块名称
+        /// </summary>
+        public string? tabName { get; set; }
+
+
+        /// <summary>
+        /// 接口名称
+        /// </summary>
+        public string? apiName { get; set; }
+
+
+        /// <summary>
+        /// 控制器文件路径
+        /// </summary>
+        public string? controllerFilePath { get; set; }
+
+
+        /// <summary>
+        /// 使用场景
+        /// </summary>
+        public int usageScenarios { get; set; }
+
+
+        /// <summary>
+        /// 接口类型
+        /// </summary>
+        public int apiKind { get; set; }
+
+
+        /// <summary>
+        /// 方法名
+        /// </summary>
+        public string? methodName { get; set; }
+
+
+        /// <summary>
+        /// 接口表述
+        /// </summary>
+        public string? apiDetail { get; set; }
+
+
+        /// <summary>
+        /// 接口参数
+        /// </summary>
+        public string? apiParam { get; set; }
+
+
+
+    }
+}