Просмотр исходного кода

添加批量删除接口信息接口

lichunlei 8 месяцев назад
Родитель
Сommit
7b454429cb
2 измененных файлов с 39 добавлено и 0 удалено
  1. 17 0
      Controllers/Admin/ApiInfoController.cs
  2. 22 0
      Model/Dto/Admin/BatchDeleteApiInfoDto.cs

+ 17 - 0
Controllers/Admin/ApiInfoController.cs

@@ -119,6 +119,23 @@ namespace Controllers.Admin
         }
 
 
+        /// <summary>
+        /// 批量删除
+        /// </summary>
+        /// <param name="param">参数请求体</param>
+        /// <returns>批量删除</returns>
+        [HttpPut]
+        [Route("/v1/omega_source/ApiInfo/batchDeleteApiInfo")]
+        public IActionResult batchDeleteApiInfo([FromBody] BatchDeleteApiInfoDto param)
+        {
+            foreach(var id in param.idList)
+            {
+                _ApiInfoService.Delete(id);
+            }
+            return SUCCESS("ok");
+        }
+
+
         /// <summary>
         /// 初始化接口
         /// </summary>

+ 22 - 0
Model/Dto/Admin/BatchDeleteApiInfoDto.cs

@@ -0,0 +1,22 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using LitJson;
+using Model;
+using Model.Base;
+using static System.Runtime.InteropServices.JavaScript.JSType;
+
+namespace Dto.Admin
+{
+    /// <summary>
+    /// 添加
+    /// </summary>
+    public class BatchDeleteApiInfoDto
+    {
+        /// <summary>
+        /// ID
+        /// </summary>
+        public int[] idList { get; set; }
+
+
+    }
+}