@ -359,8 +359,7 @@ namespace IBKLinker_Minio.Controller.MinioController
{
{
db . BeginTransaction ( ) ; //启动事务
db . BeginTransaction ( ) ; //启动事务
///拿到表自增长的值赋值给自增长主键pk
///拿到表自增长的值赋值给自增长主键pk
minioFileassociation . Pk = getPk ( "S_MINIO_FILEASSOCIATION" , "MINIO_FILEASSOCIATION" ) ;
minioFileassociation . Pk = Convert . ToInt32 ( db . QueryScalar ( "select S_MINIO_FILEASSOCIATION.nextval from dual" ) ) ;
///给创建时间赋值
minioFileassociation . CreatorTime = DateTime . Now ;
minioFileassociation . CreatorTime = DateTime . Now ;
///把需要添加的数据同步到数据库
///把需要添加的数据同步到数据库
@ -550,8 +549,9 @@ namespace IBKLinker_Minio.Controller.MinioController
else
else
{
{
request . code = "1" ;
request . code = "0" ;
request . msg = "查询失败!" ;
request . msg = "暂无数据!" ;
request . data = result ;
}
}
}
}
@ -1590,5 +1590,42 @@ namespace IBKLinker_Minio.Controller.MinioController
}
}
# endregion
# endregion
#region
[HttpPost, Route("CESHI")]
public RequestEntity CESHI ( )
{
MinioBusinessLogic bb = new MinioBusinessLogic ( ) ; //定义业务逻辑方法
RequestEntity request = new RequestEntity ( ) ;
try
{
List < RequstStoragePath > requstStoragePaths = new List < RequstStoragePath > ( ) ;
using ( IDbContext db = ObjectContainer . GetObject < IDbContext > ( "db" ) )
{
List < MinioStoragePath > rootDirectories = db . Query < MinioStoragePath > ( "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
}
}
}
}