sql+=string.Format("update MINIO_STORAGE_PATH set CLEAR_FLAG='1',CLEAR_USERS='{0}',CLEAR_TIME='{1}' where PK='{2}';",item.ClearUsers,time,item.Pk);//更新文件路径表中的删除状态
DelTask.Wait();
sql+=string.Format(" delete from MINIO_FILEASSOCIATION where FILE_PK like'%{0}%' or ASSOCIATION_FILE_PK like'%{0}%';",item.Pk);//删除关联表中的关联关系
//string sel =string.Format( "select * from MINIO_STORAGE_PATH where UPK='{0}'",item.Pk);
sql=string.Format("delete from MINIO_STORAGE_PATH where 1=1 and PK='{2}' ",item.ClearUsers,time,item.Pk);//更新文件路径表中的删除状态
//IList<MinioStoragePath> date = db.Query<MinioStoragePath>(sel);//查询删除文件夹时文件夹是否存在文件
//if (date.Count > 0)
//{
// sql = "begin ";
// foreach (var data in date)
// {
// sql += string.Format("update MINIO_STORAGE_PATH set CLEAR_FLAG='1',CLEAR_USERS='{0}',CLEAR_TIME='{1}' where PK='{2}' ", item.ClearUsers, item.ClearTime, data.Pk);
// sql += string.Format(" delete from MINIO_FILEASSOCIATION where FILE_PK like'%{0}%' or ASSOCIATION_FILE_PK like'%{0}%';", item.Pk);//删除关联表中的关联关系
// }
// sql += string.Format("update MINIO_STORAGE_PATH set CLEAR_FLAG='1',CLEAR_USERS='{0}',CLEAR_TIME='{1}' where PK='{2}' ", item.ClearUsers, time, item.Pk);//更新文件路径表中的删除状态
//}
//else
//{
sql=string.Format("update MINIO_STORAGE_PATH set CLEAR_FLAG='1',CLEAR_USERS='{0}',CLEAR_TIME='{1}' where PK='{2}' ",item.ClearUsers,time,item.Pk);//更新文件路径表中的删除状态