diff --git a/IBKLinker-Minio/Common/MinioBusinessLogic.cs b/IBKLinker-Minio/Common/MinioBusinessLogic.cs
index a64022b..638b3c4 100644
--- a/IBKLinker-Minio/Common/MinioBusinessLogic.cs
+++ b/IBKLinker-Minio/Common/MinioBusinessLogic.cs
@@ -100,10 +100,20 @@ namespace IBKLinker_Minio.Common
{
RequstStoragePath subDirModel = new RequstStoragePath();
subDirModel.Pk = subDir.Pk;//主键ID
+ subDirModel.Upk = subDir.Upk;//父级文件夹pk
subDirModel.FileName = subDir.FileName;//文件名称
subDirModel.FilePath = subDir.FilePath;//文件路径
subDirModel.FileType = subDir.FileType;//文件类型
- subDirModel.FileLever = subDir.FileLevel;//层级
+ subDirModel.FileLevel = subDir.FileLevel;//层级
+ subDirModel.CreatorTime = subDir.CreatorTime;//创建时间
+ subDirModel.CreatorUser = subDir.CreatorUser;//创建者
+ subDirModel.DownloadNum = subDir.DownloadNum;//下载次数
+ subDirModel.ModifyUsers = subDir.ModifyUsers;//修改用户
+ subDirModel.ModifyTime = subDir.ModifyTime;//修改时间
+ subDirModel.ClearUsers = subDir.ClearUsers;//删除用户
+ subDirModel.ClearTime = subDir.ClearTime;//删除时间
+ subDirModel.ClearFlag = subDir.ClearFlag;//删除标记 0未删除 1删除
+ subDirModel.DocumentType = subDir.DocumentType;//文件种类:1、技术协议 2、质量要点 3、工艺卡 4、其他
subDirModel.requstStoragePaths = GetSubDirectories(subDir.Pk); // 递归调用获取子文件夹
subDirs.Add(subDirModel);
}
diff --git a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs
index d468add..6291541 100644
--- a/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs
+++ b/IBKLinker-Minio/Controller/MinioController/MinioApiController.cs
@@ -1132,49 +1132,39 @@ namespace IBKLinker_Minio.Controller.MinioController
return date;
}
///
- /// 获取根目录和根目录下一级得菜单信息
+ /// 获取所有文件夹
///
///
[HttpPost, Route("GetRecursion")]
public RequestEntity GetRecursion()
{
+ MinioBusinessLogic bb = new MinioBusinessLogic();//定义业务逻辑方法
RequestEntity request = new RequestEntity();
try
{
- //拿到根目录
List requstStoragePaths = new List();
- List date = new List();
using (IDbContext db = ObjectContainer.GetObject("db"))
{
- string sql = string.Empty;
-
- date = db.Query("select * from MINIO_STORAGE_PATH where CLEAR_FLAG='0'and FILE_TYPE='0' ORDER BY PK").ToList();
- //UPK=0 AND FILE_LEVEL=1 and
- }
- if (date.Count > 0)
- {
- foreach (var item in date)
+ List rootDirectories = db.Query("select * from MINIO_STORAGE_PATH where CLEAR_FLAG='0' and FILE_TYPE='0'and FILE_LEVEL='1' ORDER BY PK").ToList();//查询根文件夹
+ foreach (var rootDir in rootDirectories)
{
- RequstStoragePath model = new RequstStoragePath();
-
- model.Pk = item.Pk;
- model.FileName = item.FileName;
- model.FilePath = item.FilePath;
- model.FileType = item.FileType;
- model.FileLever = item.FileLevel;
- model.requstStoragePaths = new List();
- List ds = GetMenuTree(item.Pk.ToString());
- foreach (var items in ds)
- {
- StoragePath models = new StoragePath();
- models.Pk = items.Pk;
- models.FileName = items.FileName;
- models.FilePath = items.FilePath;
- models.FileType = items.FileType;
- models.FileLever = items.FileLevel;
- model.requstStoragePaths.Add(models);
- }
- requstStoragePaths.Add(model);
+ RequstStoragePath rootModel = new RequstStoragePath();
+ rootModel.Pk = rootDir.Pk;//主键ID
+ rootModel.Upk = rootDir.Upk;//父级文件夹pk
+ rootModel.FileName = rootDir.FileName;//文件名称
+ rootModel.FilePath = rootDir.FilePath;//文件路径
+ rootModel.FileType = rootDir.FileType;//文件类型
+ rootModel.FileLevel = rootDir.FileLevel;//层级
+ rootModel.CreatorTime = rootDir.CreatorTime;//创建时间
+ rootModel.CreatorUser = rootDir.CreatorUser;//创建者
+ rootModel.DownloadNum = rootDir.DownloadNum;//下载次数
+ rootModel.ModifyUsers = rootDir.ModifyUsers;//修改用户
+ rootModel.ModifyTime = rootDir.ModifyTime;//修改时间
+ rootModel.ClearUsers = rootDir.ClearUsers;//删除用户
+ rootModel.ClearTime = rootDir.ClearTime;//删除时间
+ rootModel.ClearFlag = rootDir.ClearFlag;//删除标记 0未删除 1删除
+ rootModel.requstStoragePaths = bb.GetSubDirectories(rootDir.Pk);//子级存进list
+ requstStoragePaths.Add(rootModel);//添加list
}
}
request.data = requstStoragePaths;
@@ -1188,8 +1178,6 @@ namespace IBKLinker_Minio.Controller.MinioController
return request;
}
-
-
///
/// 权限查询
///
@@ -1346,7 +1334,7 @@ namespace IBKLinker_Minio.Controller.MinioController
{
using (IDbContext db = ObjectContainer.GetObject("db"))
{
- request.data = db.Query("select * from MINIO_OPERATIONLOG where 1=1");
+ request.data = db.Query("select * from MINIO_OPERATIONLOG where 1=1 order by OPERATE_TIME desc");
request.code = "0";
}
}
@@ -1590,42 +1578,6 @@ namespace IBKLinker_Minio.Controller.MinioController
}
#endregion
- #region
- [HttpPost, Route("CESHI")]
- public RequestEntity CESHI()
- {
- MinioBusinessLogic bb = new MinioBusinessLogic();//定义业务逻辑方法
- RequestEntity request = new RequestEntity();
- try
- {
- List requstStoragePaths = new List();
- using (IDbContext db = ObjectContainer.GetObject("db"))
- {
- List rootDirectories = db.Query("select * from MINIO_STORAGE_PATH where CLEAR_FLAG='0' and FILE_TYPE='0'and FILE_LEVEL='1' ORDER BY PK").ToList();//查询根文件夹
- foreach (var rootDir in rootDirectories)
- {
- RequstStoragePath rootModel = new RequstStoragePath();
- rootModel.Pk = rootDir.Pk;//主键ID
- rootModel.FileName = rootDir.FileName;//文件名称
- rootModel.FilePath = rootDir.FilePath;//文件路径
- rootModel.FileType = rootDir.FileType;//文件类型
- rootModel.FileLever = rootDir.FileLevel;//层级
- rootModel.requstStoragePaths = bb.GetSubDirectories(rootDir.Pk);//子级存进list
- requstStoragePaths.Add(rootModel);//添加list
- }
- }
- request.data = requstStoragePaths;
- request.code = "0";
- }
- catch (Exception)
- {
- request.code = "1";
- throw;
- }
-
- return request;
- }
- #endregion
}
}
diff --git a/IBKLinker-Minio/Entity/MinioController/RequstStoragePath.cs b/IBKLinker-Minio/Entity/MinioController/RequstStoragePath.cs
index 0a81863..b6ea547 100644
--- a/IBKLinker-Minio/Entity/MinioController/RequstStoragePath.cs
+++ b/IBKLinker-Minio/Entity/MinioController/RequstStoragePath.cs
@@ -14,6 +14,12 @@ namespace IBKLinker_Minio.Entity.MinioController
/// 主键
///
public int Pk { get; set; }
+
+ ///
+ /// 主键
+ ///
+ public int Upk { get; set; }
+
///
///文件名称
///
@@ -31,7 +37,52 @@ namespace IBKLinker_Minio.Entity.MinioController
///
///层级
///
- public int FileLever { get; set; }
+ public int FileLevel { get; set; }
+
+ ///
+ ///下载次数
+ ///
+ public int DownloadNum { get; set; }
+
+ ///
+ ///创建者
+ ///
+ public string CreatorUser { get; set; }
+
+ ///
+ ///创建时间
+ ///
+ public DateTime? CreatorTime { get; set; }
+
+ ///
+ ///修改用户
+ ///
+ public string ModifyUsers { get; set; }
+
+ ///
+ ///修改时间
+ ///
+ public DateTime? ModifyTime { get; set; }
+
+ ///
+ ///删除标记 0未删除 1删除
+ ///
+ public string ClearFlag { get; set; }
+
+ ///
+ ///删除用户
+ ///
+ public string ClearUsers { get; set; }
+
+ ///
+ ///删除时间
+ ///
+ public DateTime? ClearTime { get; set; }
+
+ ///
+ ///文件种类:1、技术协议 2、质量要点 3、工艺卡 4、其他
+ ///
+ public string DocumentType { get; set; }
}
public class RequstStoragePath: StoragePath
{