From 6232b451bbe748c88d887113bbdbf9ec17af3d0a Mon Sep 17 00:00:00 2001 From: cheng19920620 <511180749@qq.com> Date: Mon, 13 Nov 2023 15:26:17 +0800 Subject: [PATCH] =?UTF-8?q?--=E8=A7=92=E8=89=B2=E6=9F=A5=E8=AF=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9=EF=BC=8C=E8=A7=92=E8=89=B2=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=A7=92=E8=89=B2=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MinioController/MinioApiController.cs | 21 ++++++++++++++----- .../Entity/MinioController/MinioUser.cs | 6 +++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs index cb21385..556622b 100644 --- a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs +++ b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs @@ -301,12 +301,23 @@ namespace IBKLinker_Minio.Controller.MinioController { string sql = string.Empty; IList result = new List(); - if (!string.IsNullOrEmpty(minioUser.UserName.ToString())) + if (!string.IsNullOrEmpty(minioUser.UserName)) { - sql += " and USER_NAME ='" + minioUser.UserName + "'"; + sql += " and a.USER_NAME ='" + minioUser.UserName + "'"; } - - request.data = db.Query("select * from MINIO_USER where 1=1 " + sql + " ORDER BY PK"); + if (!string.IsNullOrEmpty(minioUser.UserId)) + { + sql += " and a.USER_ID ='" + minioUser.UserId + "'"; + } + if (!string.IsNullOrEmpty(minioUser.State.ToString())) + { + sql += " and a.STATE =" + minioUser.State + ""; + } + if (minioUser.RoleId>0) + { + sql += " and a.ROLE_ID =" + minioUser.RoleId + ""; + } + request.data = db.Query("select a.*,b.ROLE_ID as RoleName from MINIO_USER a left join MINIO_ROLE_PERMISSION b on a. ROLE_ID=b.ROLE_ID where 1=1 " + sql + " ORDER BY USER_ID"); request.code = "0"; } } @@ -500,7 +511,7 @@ namespace IBKLinker_Minio.Controller.MinioController /// /// 修改数据 [HttpPost, Route("UpdateRolePermission")] - public RequestEntity UpdateRolePermission(List data) + public RequestEntity UpdateRolePermission(MinioRolePermission data) { RequestEntity request = new RequestEntity(); try diff --git a/IBKLinker-Minio/Entity/MinioController/MinioUser.cs b/IBKLinker-Minio/Entity/MinioController/MinioUser.cs index 7e5c027..715f4b2 100644 --- a/IBKLinker-Minio/Entity/MinioController/MinioUser.cs +++ b/IBKLinker-Minio/Entity/MinioController/MinioUser.cs @@ -33,7 +33,11 @@ namespace IBKLinker_Minio.Entity.MinioController /// [Persistent("ROLE_ID"), DisplayName("角色ID")] public int RoleId { get; set; } - + /// + ///角色ID + /// + [Persistent(false), DisplayName("角色名称")] + public int RoleName { get; set; } /// ///创建人