From f7c5ab736557ad686cede9a51ffc3d374ad0ba41 Mon Sep 17 00:00:00 2001 From: cheng19920620 <511180749@qq.com> Date: Sat, 21 Oct 2023 15:06:23 +0800 Subject: [PATCH] =?UTF-8?q?--=E4=BF=AE=E6=94=B9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MinioController/MinioApiController.cs | 61 ++++++++++++++----- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs index 5e5c0e5..4a03bbc 100644 --- a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs +++ b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs @@ -88,7 +88,7 @@ namespace IBKLinker_Minio.Controller.MinioController /// /// 修改数据 [HttpPost, Route("UpdateAuthority")] - public RequestEntity UpdateAuthority(IList data) + public RequestEntity UpdateAuthority(List data) { RequestEntity request = new RequestEntity(); try @@ -128,7 +128,7 @@ namespace IBKLinker_Minio.Controller.MinioController /// /// 需要删除的数据 [HttpPost, Route("RemoveAuthority")] - public RequestEntity RemoveAuthority(IList master) + public RequestEntity RemoveAuthority(List master) { RequestEntity request = new RequestEntity(); try @@ -222,7 +222,7 @@ namespace IBKLinker_Minio.Controller.MinioController /// /// 修改数据 [HttpPost, Route("UpdateUSER")] - public RequestEntity UpdateUSER(IList data) + public RequestEntity UpdateUSER(List data) { RequestEntity request = new RequestEntity(); try @@ -262,7 +262,7 @@ namespace IBKLinker_Minio.Controller.MinioController /// /// 需要删除的数据 [HttpPost, Route("RemoveUSER")] - public RequestEntity RemoveUSER(IList master) + public RequestEntity RemoveUSER(List master) { RequestEntity request = new RequestEntity(); try @@ -322,7 +322,7 @@ namespace IBKLinker_Minio.Controller.MinioController #region minio文件关联表 /// - /// 添加minio角色表 + /// 添加minio文件关联表 /// /// 文件关联表 [HttpPost, Route("AddFileassociation")] @@ -352,11 +352,11 @@ namespace IBKLinker_Minio.Controller.MinioController return request; } /// - /// 修改minio角色表 + /// 修改minio文件关联表 /// /// 修改数据 [HttpPost, Route("UpdateFileassociation")] - public RequestEntity UpdateFileassociation(IList data) + public RequestEntity UpdateFileassociation(List data) { RequestEntity request = new RequestEntity(); try @@ -392,11 +392,11 @@ namespace IBKLinker_Minio.Controller.MinioController } /// - /// 删除minio角色表 + /// 删除minio文件关联表 /// /// 需要删除的数据 [HttpPost, Route("RemoveFileassociation")] - public RequestEntity RemoveFileassociation(IList master) + public RequestEntity RemoveFileassociation(List master) { RequestEntity request = new RequestEntity(); try @@ -422,7 +422,7 @@ namespace IBKLinker_Minio.Controller.MinioController /// - /// 查询minio角色表 + /// 查询minio文件关联表 /// /// [HttpPost, Route("GetFileassociation")] @@ -490,7 +490,7 @@ namespace IBKLinker_Minio.Controller.MinioController /// /// 修改数据 [HttpPost, Route("UpdateRolePermission")] - public RequestEntity UpdateRolePermission(IList data) + public RequestEntity UpdateRolePermission(List data) { RequestEntity request = new RequestEntity(); try @@ -530,7 +530,7 @@ namespace IBKLinker_Minio.Controller.MinioController /// /// 需要删除的数据 [HttpPost, Route("RemoveRolePermission")] - public RequestEntity RemoveRolePermission(IList master) + public RequestEntity RemoveRolePermission(List master) { RequestEntity request = new RequestEntity(); try @@ -693,7 +693,7 @@ namespace IBKLinker_Minio.Controller.MinioController /// /// 修改数据 [HttpPost, Route("UpdateStoragePath")] - public RequestEntity UpdateStoragePath(IList data) + public RequestEntity UpdateStoragePath(List data) { RequestEntity request = new RequestEntity(); try @@ -915,9 +915,40 @@ namespace IBKLinker_Minio.Controller.MinioController { sql += "d.File_Name='" + FileName + "'"; } - if (!string.IsNullOrEmpty(FileName)) + if (!string.IsNullOrEmpty(EmpowerType)) { - sql += "b." + EmpowerType + "=1"; + if (EmpowerType == "打印") + { + sql += "b.PRINT_FLAG=1"; + } + if (EmpowerType == "查看") + { + sql += "b.VIEW_FLAG=1"; + } + if (EmpowerType == "上传") + { + sql += "b.UPLOAD_FLAG=1"; + } + if (EmpowerType == "编辑") + { + sql += "b.EDIT_FLAG=1"; + } + if (EmpowerType == "移动") + { + sql += "b.MOVE_FLAG=1"; + } + if (EmpowerType == "删除") + { + sql += "b.DELETE_FLAG=1"; + } + if (EmpowerType == "文件夹查看") + { + sql += "b.FILE_VIEW_PERMISSIONS=1"; + } + if (EmpowerType == "文件夹控制") + { + sql += "b.FILE_CONTROL_PERMISSIONS=1"; + } } request.data = db.Query("select b.*,d.FILE_NAME,d.FILE_PATH from minio_user a left join minio_role_permission b on a.role_id=b.id left join minio_authority c on b.limits_authority_id=c.limits_authority_id left join minio_storage_path d on c.file_id=d.pk where 1=1 " + sql + " ORDER BY a.creator_time").ToList();