修改文件下载及查看接口逻辑,文件路径表实体类增加版本字段,修改查询minio用户表方法GetUSER指定角色查询报错问题

master
孙亮 11 months ago
parent 30808bfffb
commit f78fa2a0b7

@ -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<UserModel>("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
}
}

@ -128,6 +128,12 @@ namespace IBKLinker_Minio.Entity.MinioController
[Persistent("DOCUMENT_TYPE"), DisplayName("文件种类")]
public string DocumentType { get; set; }
/// <summary>
///版本
/// </summary>
[Persistent("VERSION"), DisplayName("版本")]
public string Version { get; set; }
/// <summary>
///文件格式

Loading…
Cancel
Save