Browse Source

添加页面绑定操作

Yuan 2 years ago
parent
commit
cc2fd6e3a4

+ 49 - 0
OASystem/OASystem.Api/Controllers/SystemController.cs

@@ -1278,6 +1278,55 @@ namespace OASystem.API.Controllers
             }
             return Ok(view);
         }
+
+        /// <summary>
+        /// 删除页面
+        /// </summary>
+        /// <param></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> DelPageInfo(List<SystemMenuDelDto> Dto)
+        {
+            JsonView view = new JsonView();
+            if (Dto.Count > 0)
+            {
+                try
+                {
+                    _SystemMenuPermissionRepository.BeginTran();
+                    bool istrue = false;
+                    foreach (var item in Dto)
+                    {
+                        istrue = await _SystemMenuPermissionRepository.SoftDeleteAsync(item.Pageid.ToString());
+                        if (!istrue)
+                        {
+                            throw new Exception("修改失败");
+                        }
+                    }
+                    
+                    view.Code = 200;
+                    view.Msg = "删除成功!";
+                    view.Data = istrue;
+                    _SystemMenuPermissionRepository.CommitTran();
+                }
+                catch (Exception)
+                {
+                    _SystemMenuPermissionRepository.RollbackTran();
+                }
+            }
+            return Ok(JsonView(view));
+        }
+
+        #endregion
+
+        #region 页面操作
+        public async Task<IActionResult> PageFunInit()
+        {
+            return Ok("");
+        }
+
+
+
         #endregion
     }
 }

+ 19 - 0
OASystem/OASystem.Domain/Dtos/System/SystemMenuDto.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Dtos.System
+{
+    public class SystemMenuDto
+    {
+
+    }
+
+    public class SystemMenuDelDto
+    {
+        public int Pageid { get; set; }
+        public int Userid { get; set; }
+    }
+}