List<MinioStoragePath>subDirectories=db.Query<MinioStoragePath>("select * from MINIO_STORAGE_PATH where UPK ='"+parentPk+"' and CLEAR_FLAG='0' and FILE_TYPE='0' ORDER BY PK").ToList();//查询子级中是否还有子级
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();//查询根文件夹
rootDirectories =db.Query<MinioStoragePath>("select * from MINIO_STORAGE_PATH where CLEAR_FLAG='0' and FILE_TYPE='0' ORDER BY PK").ToList();//查询所有文件夹
data=db.Query<MinioStoragePath>("select * from minio_storage_path where upk='"+master+"' order by CREATOR_TIME asc").ToList();
foreach(varitemindata)
{
boolAsstion=true;//定义是否执行关联
//sql = string.Format("select g.title from ASSETENTRY g where entryid in (select entryid2 from ASSETLINK t where entryid1 = (select t.entryid from ASSETENTRY t ,(select p.fileid from DLSYNC p where p.name = '{0}' and (p.event='add' or p.event = 'update') )o where t.classpk = o.fileid))", item.FileName);
sql=string.Format("select g.title,g.username,g.createdate from ASSETENTRY g where entryid in (select entryid2 from ASSETLINK t where entryid1 = (select t.entryid from ASSETENTRY t ,(select p.fileid from DLSYNC p where p.name = '{0}' and (p.event='add' or p.event = 'update') and p.version='{1}' and ROWNUM = 1 order by p.version desc)o where t.classpk = o.fileid)) ",item.FileName,item.Version);
dt=db.Query(sql);
if(dt.Rows.Count>0)
{
for(inti=0;i<dt.Rows.Count;i++)
{
MinioFileassociationdc=newMinioFileassociation();
datan=db.Query<MinioStoragePath>("select * from minio_storage_path where file_name='"+dt.Rows[i]["title"].ToString()+"'").ToList();
SelMFdata=db.Query<MinioFileassociation>("select * from MINIO_FILEASSOCIATION where 1=1 and (FILE_PK='"+item.Pk+"' or ASSOCIATION_FILE_PK='"+item.Pk+"')");
//data = db.Query<MinioStoragePath>("select * from minio_storage_path where upk='" + master + "' order by CREATOR_TIME desc").ToList();
//foreach (var item in data)
//{
//sql = string.Format("select g.title from ASSETENTRY g where entryid in (select entryid2 from ASSETLINK t where entryid1 = (select t.entryid from ASSETENTRY t ,(select p.fileid from DLSYNC p where p.name = '{0}' and (p.event='add' or p.event = 'update') )o where t.classpk = o.fileid))", item.FileName);
sql=string.Format("select * from DLSYNC where parentfolderid='{0}' and (event='update' or event='add') ",parentfolderid);
dt=db.Query(sql);
stringsel=string.Format("select * from minio_storage_path where pk='{0}'",master);;
dta=db.Query(sel);
if(dt.Rows.Count>0)
{
for(inti=0;i<dt.Rows.Count;i++)
{
ctime=dt.Rows[i]["CREATEDATE"].ToString();
mtime=dt.Rows[i]["MODIFIEDDATE"].ToString();
MinioStoragePathdc=newMinioStoragePath();
datan=db.Query<MinioStoragePath>("select * from minio_storage_path where file_name='"+dt.Rows[i]["NAME"].ToString()+"'").ToList();
if(datan.Count<1)
{
dc.Pk=Convert.ToInt32(db.QueryScalar("select s_minio_storage_path.nextval from dual"));