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

模块支持系统参数改为数组

lichunlei 8 месяцев назад
Родитель
Сommit
a380e0af8e
2 измененных файлов с 62 добавлено и 2 удалено
  1. 6 2
      Controllers/Admin/AppModuleController.cs
  2. 56 0
      Model/Dto/Admin/EditAppModuleDto.cs

+ 6 - 2
Controllers/Admin/AppModuleController.cs

@@ -6,6 +6,8 @@ using Model.Base;
 using Vo.Admin;
 using Mapster;
 using Infrastructure;
+using Dto.Admin;
+using SqlSugar.Extensions;
 
 
 namespace Controllers.Admin
@@ -66,9 +68,10 @@ namespace Controllers.Admin
         /// <returns>添加</returns>
         [HttpPost]
         [Route("/v1/omega_source/AppModule/addAppModule")]
-        public IActionResult addAppModule([FromBody] AppModule param)
+        public IActionResult addAppModule([FromBody] EditAppModuleDto param)
         {
             var modal = param.Adapt<AppModule>().ToCreate(HttpContext);
+            modal.systemSupport = string.Join(",", param.systemSupport);
             var response = _AppModuleService.InsertReturnIdentity(modal);
             return SUCCESS(response);
         }
@@ -81,9 +84,10 @@ namespace Controllers.Admin
         /// <returns>修改</returns>
         [HttpPut]
         [Route("/v1/omega_source/AppModule/updateAppModule")]
-        public IActionResult updateAppModule([FromBody] AppModule param)
+        public IActionResult updateAppModule([FromBody] EditAppModuleDto param)
         {
             var modal = param.Adapt<AppModule>().ToCreate(HttpContext);
+            modal.systemSupport = string.Join(",", param.systemSupport);
             var response = _AppModuleService.Update(modal, true);
             return SUCCESS(response);
         }

+ 56 - 0
Model/Dto/Admin/EditAppModuleDto.cs

@@ -0,0 +1,56 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using Model.Base;
+
+namespace Dto.Admin
+{
+    /// <summary>
+    /// 添加
+    /// </summary>
+    public class EditAppModuleDto
+    {
+        /// <summary>
+        /// ID
+        /// </summary>
+        public int id { get; set; }
+
+
+        /// <summary>
+        /// 模块名称
+        /// </summary>
+        public string? moduleName { get; set; }
+
+
+        /// <summary>
+        /// 模块介绍
+        /// </summary>
+        public string? moduleDetail { get; set; }
+
+
+        /// <summary>
+        /// 状态
+        /// </summary>
+        public int status { get; set; }
+
+
+        /// <summary>
+        /// 模块功能
+        /// </summary>
+        public string? moduleFeature { get; set; }
+
+
+        /// <summary>
+        /// 使用厂商
+        /// </summary>
+        public string? factoryOwner { get; set; }
+
+
+        /// <summary>
+        /// 支付系统
+        /// </summary>
+        public string[] systemSupport { get; set; }
+
+
+
+    }
+}