From f78fa2a0b70c0c3e2e26332f5cb0539c322ae6c7 Mon Sep 17 00:00:00 2001 From: sunliang <593170460@qq.com> Date: Thu, 28 Dec 2023 17:49:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E5=8F=8A=E6=9F=A5=E7=9C=8B=E6=8E=A5=E5=8F=A3=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=E8=A1=A8?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E7=B1=BB=E5=A2=9E=E5=8A=A0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?minio=E7=94=A8=E6=88=B7=E8=A1=A8=E6=96=B9=E6=B3=95GetUSER?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E8=A7=92=E8=89=B2=E6=9F=A5=E8=AF=A2=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MinioController/MinioApiController.cs | 15 +++++++-------- .../Entity/MinioController/MinioStoragePath.cs | 6 ++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs index b083322..d4ec450 100644 --- a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs +++ b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs @@ -320,7 +320,7 @@ namespace IBKLinker_Minio.Controller.MinioController } if (minioUser.RoleId != "") { - sql += " and a.ROLE_ID =" + minioUser.RoleId + ""; + sql += " and a.ROLE_ID ='" + minioUser.RoleId + "'"; } request.data = db.Query("select a.*,b.Role_Name as RoleName from MINIO_USER a left join MINIO_ROLE_PERMISSION b on a. ROLE_ID=b.ID where 1=1 " + sql + " ORDER BY USER_ID"); request.code = "0"; @@ -1100,10 +1100,10 @@ namespace IBKLinker_Minio.Controller.MinioController { sql += " and FILE_NAME like'%" + PathData.FileName + "%'"; } - if (PathData.Upk > 0) //如果在子文件夹内 - { - sql += " and UPK = '" + PathData.Upk + "'"; - } + //if (PathData.Upk > 0) //如果在子文件夹内 + //{ + // sql += " and UPK = '" + PathData.Upk + "'"; + //} if (!string.IsNullOrEmpty(PathData.BeginTime))//如果有开始时间 { sql += string.Format(" and CREATE_TIME >= to_date('{0}', 'yyyy/mm/dd hh24:mi:ss')", PathData.BeginTime);//开始时间 @@ -1302,7 +1302,8 @@ namespace IBKLinker_Minio.Controller.MinioController { MinioStoragePath date = new MinioStoragePath();//定义单条返回数据 string BuckName = bb.GetBuckName();//调用取桶名称方法 - var uploadTask = bb.Download(BuckName, item.FileName);//异步取base64 + string NewFileName = item.FileName.Replace(".pdf","_") + item.Version + ".pdf"; + var uploadTask = bb.Download(BuckName, NewFileName);//异步取base64 uploadTask.Wait();//等待取值 if (uploadTask.Status == TaskStatus.RanToCompletion && !uploadTask.IsFaulted) //判读是否有数值 { @@ -1538,7 +1539,5 @@ namespace IBKLinker_Minio.Controller.MinioController return result; } #endregion - - } } diff --git a/IBKLinker-Minio/Entity/MinioController/MinioStoragePath.cs b/IBKLinker-Minio/Entity/MinioController/MinioStoragePath.cs index 3683ebe..fa121c9 100644 --- a/IBKLinker-Minio/Entity/MinioController/MinioStoragePath.cs +++ b/IBKLinker-Minio/Entity/MinioController/MinioStoragePath.cs @@ -128,6 +128,12 @@ namespace IBKLinker_Minio.Entity.MinioController [Persistent("DOCUMENT_TYPE"), DisplayName("文件种类")] public string DocumentType { get; set; } + /// + ///版本 + /// + [Persistent("VERSION"), DisplayName("版本")] + public string Version { get; set; } + /// ///文件格式