还原
This commit is contained in:
1 parent
280ccf4de8
commit
032f048a16
25 files changed
+2673
-718
No files matched your search
@@ -59,7 +59,7 @@ namespace CloudBuilder.Core.DatabaseAccessor
|
||||
//public byte[] RowVersion { get; set; }
|
||||
if (ex.Message.Contains("data may have been modified or deleted since entities were loaded."))
|
||||
{
|
||||
throw new ValidatedException(CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.THE_DATA_HAS_BEEN_MODIFIED));
|
||||
throw new ValidatedException(CoreMessagePolicy.GetInstance(_serviceProvider).ComposeMessage(CoreMessagePolicy.THE_DATA_HAS_BEEN_MODIFIED));
|
||||
}
|
||||
throw new ValidatedException(ex.InnerException?.Message ?? ex.Message);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using CloudBuilder.Core.Service;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.IdentityModel.JsonWebTokens;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -45,7 +46,7 @@ namespace CloudBuilder.Core.DatabaseAccessor
|
||||
{
|
||||
if (ex.Message.Contains("data may have been modified or deleted since entities were loaded."))
|
||||
{
|
||||
throw new ValidatedException(CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.THE_DATA_HAS_BEEN_MODIFIED));
|
||||
throw new ValidatedException(CoreMessagePolicy.GetInstance(_serviceProvider).ComposeMessage(CoreMessagePolicy.THE_DATA_HAS_BEEN_MODIFIED));
|
||||
}
|
||||
throw new ValidatedException(ex.InnerException?.Message ?? ex.Message);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CloudBuilder.Core.DependencyInjection.Form;
|
||||
using CloudBuilder.Core.DatabaseAccessor.Entity;
|
||||
using CloudBuilder.Core.DependencyInjection.Form;
|
||||
using CloudBuilder.Core.DependencyInjection.Policy;
|
||||
using CloudBuilder.Core.DependencyInjection.Request;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
@@ -22,9 +23,9 @@ namespace CloudBuilder.Core.Policy
|
||||
this.values = new string[] { THE_DATA_HAS_BEEN_MODIFIED, NO_PERMISSION };
|
||||
}
|
||||
|
||||
public static CoreMessagePolicy GetInstance()
|
||||
public static CoreMessagePolicy GetInstance(IServiceProvider serviceProvider)
|
||||
{
|
||||
instance = ApplicationServiceContext.ServiceProvider.GetKeyedService<CoreMessagePolicy>(typeof(CoreMessagePolicy).Name);
|
||||
instance = serviceProvider.GetKeyedService<CoreMessagePolicy>(typeof(CoreMessagePolicy).Name);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CloudBuilder.Core.DependencyInjection.Form;
|
||||
using CloudBuilder.Core.DependencyInjection.Policy;
|
||||
using CloudBuilder.Core.DependencyInjection.Request;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
@@ -9,7 +10,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace System
|
||||
{
|
||||
public class SearchFilterOperatorPolicy : AbstractPolicy
|
||||
public class SearchFilterOperatorPolicy : AbstractPolicy, IPolicy
|
||||
{
|
||||
public const string EQUAL_TO = "equal_to";//='value'
|
||||
public const string CONTAIN = "contain";//like '%value%'
|
||||
@@ -71,9 +72,9 @@ namespace System
|
||||
};
|
||||
}
|
||||
|
||||
public static SearchFilterOperatorPolicy GetInstance()
|
||||
public static SearchFilterOperatorPolicy GetInstance(IServiceProvider serviceProvider)
|
||||
{
|
||||
instance = ApplicationServiceContext.ServiceProvider.GetKeyedService<SearchFilterOperatorPolicy>(typeof(SearchFilterOperatorPolicy).Name);
|
||||
instance = serviceProvider.GetKeyedService<SearchFilterOperatorPolicy>(typeof(SearchFilterOperatorPolicy).Name);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CloudBuilder.Core.DependencyInjection.Form;
|
||||
using CloudBuilder.Core.DependencyInjection.Policy;
|
||||
using CloudBuilder.Core.DependencyInjection.Request;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
@@ -9,7 +10,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace System
|
||||
{
|
||||
public class SearchFilterTypePolicy : AbstractPolicy
|
||||
public class SearchFilterTypePolicy : AbstractPolicy, IPolicy
|
||||
{
|
||||
public const string TEXT = "Text";
|
||||
public const string TEXT_CONTAIN = "TextContain";
|
||||
@@ -31,9 +32,9 @@ namespace System
|
||||
this.values = new string[] { TEXT, TEXT_CONTAIN, NUMBER, DATE, DATETIME, MULTIPLE_SELECTION, SINGLE_SELECTION };
|
||||
}
|
||||
|
||||
public static SearchFilterTypePolicy GetInstance()
|
||||
public static SearchFilterTypePolicy GetInstance(IServiceProvider serviceProvider)
|
||||
{
|
||||
instance = ApplicationServiceContext.ServiceProvider.GetKeyedService<SearchFilterTypePolicy>(typeof(SearchFilterTypePolicy).Name);
|
||||
instance = serviceProvider.GetKeyedService<SearchFilterTypePolicy>(typeof(SearchFilterTypePolicy).Name);
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace System
|
||||
this.values = new string[] { YES, NO };
|
||||
}
|
||||
|
||||
public static YesNoPolicy GetInstance()
|
||||
public static YesNoPolicy GetInstance(IServiceProvider serviceProvider)
|
||||
{
|
||||
instance = ApplicationServiceContext.ServiceProvider.GetKeyedService<YesNoPolicy>(typeof(YesNoPolicy).Name);
|
||||
instance = serviceProvider.GetKeyedService<YesNoPolicy>(typeof(YesNoPolicy).Name);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using System;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text;
|
||||
@@ -138,7 +139,7 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance(provider).ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
@@ -188,7 +189,7 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance(provider).ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
@@ -244,7 +245,7 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance(provider).ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
@@ -275,7 +276,7 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance(provider).ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
@@ -306,7 +307,7 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance(provider).ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
@@ -335,7 +336,7 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance(provider).ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
@@ -395,7 +396,7 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance(provider).ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
@@ -429,7 +430,7 @@ namespace CloudBuilder.Core.Request
|
||||
if (responseContext != null && responseContext.StartsWith("{\"errors\"")) errors = responseContext.Substring(11, responseContext.IndexOf("}") - 11);
|
||||
|
||||
if (response.ReasonPhrase == "Forbidden")
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance().ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
throw new Exception(string.Format("{0}", CoreMessagePolicy.GetInstance(provider).ComposeMessage(CoreMessagePolicy.NO_PERMISSION)));
|
||||
|
||||
throw new Exception(string.Format("{0}{1}", response.ReasonPhrase, string.IsNullOrEmpty(errors) ? "" : "\r\n" + errors));
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -12,16 +13,16 @@ namespace CloudBuilder.Core.Service
|
||||
public const string KEY_FILTER_OPERATOR = "filter_operator";
|
||||
public const string KEY_FILTER_TYPE = "filter_type";
|
||||
|
||||
public SearchCriteria()
|
||||
public SearchCriteria(IServiceProvider serviceProvider)
|
||||
{
|
||||
Add(KEY_FILTER_OPERATOR, SearchFilterOperatorPolicy.GetInstance().GetBindOptions());
|
||||
Add(KEY_FILTER_TYPE, SearchFilterTypePolicy.GetInstance().GetBindOptions());
|
||||
Add(KEY_FILTER_OPERATOR, SearchFilterOperatorPolicy.GetInstance(serviceProvider).GetBindOptions());
|
||||
Add(KEY_FILTER_TYPE, SearchFilterTypePolicy.GetInstance(serviceProvider).GetBindOptions());
|
||||
}
|
||||
public SearchCriteria(Selection[] selections)
|
||||
public SearchCriteria(IServiceProvider serviceProvider,Selection[] selections)
|
||||
{
|
||||
Selections = selections;
|
||||
Add(KEY_FILTER_OPERATOR, SearchFilterOperatorPolicy.GetInstance().GetBindOptions());
|
||||
Add(KEY_FILTER_TYPE, SearchFilterTypePolicy.GetInstance().GetBindOptions());
|
||||
Add(KEY_FILTER_OPERATOR, SearchFilterOperatorPolicy.GetInstance(serviceProvider).GetBindOptions());
|
||||
Add(KEY_FILTER_TYPE, SearchFilterTypePolicy.GetInstance(serviceProvider).GetBindOptions());
|
||||
}
|
||||
public Selection[] Selections { get; set; }
|
||||
|
||||
|
||||
@@ -364,35 +364,29 @@ namespace CloudBuilder.Master.Service
|
||||
[PermissionOperate(name: MasterPermissionPolicy.DmsFile, operate: Operate.Delete)]
|
||||
[UnitOfWork]
|
||||
public void Delete(long key)
|
||||
{
|
||||
Delete(key, false);
|
||||
}
|
||||
|
||||
private void Delete(long key, bool hasCreateDmsFileDeleteLog)
|
||||
{
|
||||
DmsFileEntity dmsFile = repository.DetachedEntities.Where(x => x.FileId == key).FirstOrDefault()!;
|
||||
|
||||
if (dmsFile == null) return;
|
||||
|
||||
if (!hasCreateDmsFileDeleteLog) CreateDmsFileDeleteLog(dmsFile, null);
|
||||
|
||||
IRepository<DmsFileUploadEntity> repositoryUpload = repository.GetRepository<IRepository<DmsFileUploadEntity>>();
|
||||
IRepository<DmsFolderMapEntity> repositoryFolderMap = repository.GetRepository<IRepository<DmsFolderMapEntity>>();
|
||||
IRepository<DmsFolderEntity> repositoryFolder = repository.GetRepository<IRepository<DmsFolderEntity>>();
|
||||
|
||||
repository.DeleteNow(dmsFile);
|
||||
|
||||
IRepository<DmsFileDeleteLogEntity> repositoryDmsFileDeleteLog = repository.GetRepository<IRepository<DmsFileDeleteLogEntity>>();
|
||||
DmsFileDeleteLogEntity dmsFileDeleteLogEntity = new DmsFileDeleteLogEntity();
|
||||
ObjectCopyHelper.Copy(dmsFile, dmsFileDeleteLogEntity);
|
||||
repositoryDmsFileDeleteLog.InsertNow(dmsFileDeleteLogEntity);
|
||||
|
||||
DmsFileUploadEntity DmsFileUpload = repositoryUpload.DetachedEntities.Where(x => x.FileId == key).FirstOrDefault()!;
|
||||
|
||||
IRepository<DmsFileUploadDeleteLogEntity> repositoryDmsFileUploadDeleteLog = repository.GetRepository<IRepository<DmsFileUploadDeleteLogEntity>>();
|
||||
IRepository<DmsFolderDeleteLogEntity> repositoryDmsFolderDeleteLog = repository.GetRepository<IRepository<DmsFolderDeleteLogEntity>>();
|
||||
IRepository<DmsFolderMapDeleteLogEntity> repositoryDmsFolderMapDeleteLog = repository.GetRepository<IRepository<DmsFolderMapDeleteLogEntity>>();
|
||||
|
||||
if (DmsFileUpload != null)
|
||||
{
|
||||
repositoryUpload.DeleteNow(DmsFileUpload);
|
||||
|
||||
DmsFileUploadDeleteLogEntity DmsFileUploadDeleteLogEntity = new DmsFileUploadDeleteLogEntity();
|
||||
ObjectCopyHelper.Copy(DmsFileUpload, DmsFileUploadDeleteLogEntity);
|
||||
repositoryDmsFileUploadDeleteLog.InsertNow(DmsFileUploadDeleteLogEntity);
|
||||
}
|
||||
|
||||
if (dmsFile.IsDirectoryIndc == YesNoPolicy.YES)
|
||||
@@ -404,32 +398,21 @@ namespace CloudBuilder.Master.Service
|
||||
if (folder != null)
|
||||
{
|
||||
repositoryFolder.DeleteNow(folder);
|
||||
|
||||
DmsFolderDeleteLogEntity dfdLog = new DmsFolderDeleteLogEntity();
|
||||
ObjectCopyHelper.Copy(folder, dfdLog);
|
||||
repositoryDmsFolderDeleteLog.InsertNow(dfdLog);
|
||||
|
||||
}
|
||||
|
||||
DmsFolderMapEntity[] folderMaps = repositoryFolderMap.DetachedEntities.Where(x => x.FolderNameSon == dmsFile.FileName || x.FolderNameParent == dmsFile.FileName).ToArray();
|
||||
|
||||
DmsFolderMapDeleteLogEntity dmsFolderMapEntity;
|
||||
if (folderMaps != null && folderMaps.Length > 0)
|
||||
{
|
||||
foreach (var map in folderMaps)
|
||||
{
|
||||
repositoryFolderMap.DeleteNow(map);
|
||||
dmsFolderMapEntity = new DmsFolderMapDeleteLogEntity();
|
||||
ObjectCopyHelper.Copy(map, dmsFolderMapEntity);
|
||||
repositoryDmsFolderMapDeleteLog.InsertNow(dmsFolderMapEntity);
|
||||
|
||||
if (map.FolderNameSon == folder.FolderName) continue;
|
||||
//刪除dmsfoler下的所有內容
|
||||
DeleteFolder(map.FolderNameSon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -438,12 +421,229 @@ namespace CloudBuilder.Master.Service
|
||||
if (folderMap != null)
|
||||
repositoryFolderMap.DeleteNow(folderMap);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void CreateDmsFileDeleteLogByDirectory(DmsFileEntity dmsFile, DmsFolderDeleteLogEntity folder)
|
||||
{
|
||||
IRepository<DmsFolderDeleteLogEntity> repositoryFolder = repository.GetRepository<IRepository<DmsFolderDeleteLogEntity>>();
|
||||
ISecurityGeneratorNumberService securityGeneratorNumberService = service.ServiceProvider.GetService<ISecurityGeneratorNumberService>()!;
|
||||
|
||||
string folderNameParent = folder.FolderName;
|
||||
|
||||
//创建当前目录
|
||||
folder = new DmsFolderDeleteLogEntity();
|
||||
folder.FolderName = securityGeneratorNumberService.GetNo(MasterPrefixPolicy.DMS_FOLDER_DELETE_LOG, MasterPrefixPolicy.DMS_FOLDER_DELETE_LOG_FOLDER_NAME, "DR", YesNoPolicy.NO, "00000000");
|
||||
folder.FolderLocalName = dmsFile.OrgFileName;//如果是目录,这个就是目录名称
|
||||
repositoryFolder.InsertNow(folder);
|
||||
//创建目录关系表
|
||||
DmsFolderMapDeleteLogEntity map = new DmsFolderMapDeleteLogEntity();
|
||||
IRepository<DmsFolderMapDeleteLogEntity> repositoryFolderMap = repository.GetRepository<IRepository<DmsFolderMapDeleteLogEntity>>();
|
||||
map.FolderNameParent = folderNameParent;
|
||||
map.FolderNameSon = folder.FolderName;
|
||||
repositoryFolderMap.InsertNow(map);
|
||||
|
||||
//创建Dms目录
|
||||
IRepository<DmsFileDeleteLogEntity> repositoryDmsFileDeleteLog = repository.GetRepository<IRepository<DmsFileDeleteLogEntity>>();
|
||||
DmsFileDeleteLogEntity entity = new DmsFileDeleteLogEntity();
|
||||
ObjectCopyHelper.Copy(dmsFile, entity);
|
||||
entity.OrderKey = entity.FileName = folder.FolderName;
|
||||
|
||||
entity.FileId = 0;
|
||||
entity.FilePath = folderNameParent;
|
||||
repositoryDmsFileDeleteLog.InsertNow(entity);
|
||||
|
||||
DmsFileUploadDeleteLogEntity upload = new DmsFileUploadDeleteLogEntity();
|
||||
upload.FileId = entity.FileId;
|
||||
upload.FileCategory = "MASTER";
|
||||
upload.UploadName = securityGeneratorNumberService.GetNo(MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG, MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG_UPLOAD_NAME, "DR", YesNoPolicy.NO, MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG_FORMAT);
|
||||
upload.OrgFileName = entity.OrgFileName;
|
||||
|
||||
IRepository<DmsFileUploadDeleteLogEntity> repositoryUpload = repository.GetRepository<IRepository<DmsFileUploadDeleteLogEntity>>();
|
||||
|
||||
repositoryUpload.InsertNow(upload);
|
||||
|
||||
//创建所有目录下的内容
|
||||
DmsFileEntity[] dmsFiles = repository.DetachedEntities.Where(x => x.FilePath == dmsFile.FileName).ToArray();
|
||||
if (dmsFiles == null || dmsFiles.Length == 0) return;
|
||||
|
||||
foreach (var dms in dmsFiles)
|
||||
{
|
||||
CreateDmsFileDeleteLog(dms, folder);
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateDmsFileDeleteLog(DmsFileEntity dmsFile, DmsFolderDeleteLogEntity folderLog)
|
||||
{
|
||||
IRepository<DmsFileDeleteLogEntity> repositoryDmsFileDeleteLog = repository.GetRepository<IRepository<DmsFileDeleteLogEntity>>();
|
||||
IRepository<DmsFileUploadDeleteLogEntity> repositoryDmsFileUploadDeleteLog = repository.GetRepository<IRepository<DmsFileUploadDeleteLogEntity>>();
|
||||
IRepository<DmsFolderDeleteLogEntity> repositoryDmsFolderDeleteLog = repository.GetRepository<IRepository<DmsFolderDeleteLogEntity>>();
|
||||
IRepository<DmsFolderMapDeleteLogEntity> repositoryDmsFolderMapDeleteLog = repository.GetRepository<IRepository<DmsFolderMapDeleteLogEntity>>();
|
||||
|
||||
ISecurityGeneratorNumberService securityGeneratorNumberService = service.ServiceProvider.GetService<ISecurityGeneratorNumberService>()!;
|
||||
|
||||
//如果顶级目录不存在,创建顶级目录
|
||||
if (folderLog == null)
|
||||
folderLog = repositoryDmsFolderDeleteLog.DetachedEntities.Where(x => x.FolderLocalName == service.UserId).FirstOrDefault()!;
|
||||
|
||||
if (folderLog == null)
|
||||
{
|
||||
folderLog = new DmsFolderDeleteLogEntity();
|
||||
folderLog.FolderName = securityGeneratorNumberService.GetNo(MasterPrefixPolicy.DMS_FOLDER_DELETE_LOG, MasterPrefixPolicy.DMS_FOLDER_DELETE_LOG_FOLDER_NAME, null, YesNoPolicy.NO, "00000000");
|
||||
folderLog.FolderLocalName = service.UserId;
|
||||
repositoryDmsFolderDeleteLog.InsertNow(folderLog);
|
||||
}
|
||||
|
||||
string folderNameParent = folderLog.FolderName;
|
||||
|
||||
if (dmsFile.IsDirectoryIndc == YesNoPolicy.YES)
|
||||
{
|
||||
CreateDmsFileDeleteLogByDirectory(dmsFile, folderLog);
|
||||
return;
|
||||
}
|
||||
|
||||
DmsFileUploadDeleteLogEntity uploadLog = new DmsFileUploadDeleteLogEntity();
|
||||
|
||||
uploadLog.FileCategory = "MASTER";
|
||||
uploadLog.UploadName = securityGeneratorNumberService.GetNo(MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG, MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG_UPLOAD_NAME, "FL", YesNoPolicy.NO, MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG_FORMAT);
|
||||
uploadLog.OrgFileName = dmsFile.OrgFileName;
|
||||
|
||||
//创建Dms文件,需更新父目录
|
||||
DmsFileDeleteLogEntity entityLog = new DmsFileDeleteLogEntity();
|
||||
ObjectCopyHelper.Copy(dmsFile, entityLog);
|
||||
entityLog.FilePath = folderNameParent;
|
||||
entityLog.FileId = 0;
|
||||
repositoryDmsFileDeleteLog.InsertNow(entityLog);
|
||||
|
||||
uploadLog.FileId = entityLog.FileId;
|
||||
repositoryDmsFileUploadDeleteLog.InsertNow(uploadLog);
|
||||
|
||||
//创建目录关系表
|
||||
DmsFolderMapDeleteLogEntity mapLog = new DmsFolderMapDeleteLogEntity();
|
||||
mapLog.FolderNameParent = folderNameParent;
|
||||
mapLog.FolderNameSon = entityLog.FileName;
|
||||
repositoryDmsFolderMapDeleteLog.InsertNow(mapLog);
|
||||
}
|
||||
|
||||
|
||||
[PermissionOperate(name: MasterPermissionPolicy.DmsFile, operate: Operate.Insert)]
|
||||
[UnitOfWork]
|
||||
public void RestoreDmsFile(long key)
|
||||
{
|
||||
DeleteLog(key, true);
|
||||
}
|
||||
|
||||
|
||||
private void RestoreDmsFileByDirectory(DmsFileDeleteLogEntity dmsFile, DmsFolderEntity folder)
|
||||
{
|
||||
IRepository<DmsFolderEntity> repositoryFolder = repository.GetRepository<IRepository<DmsFolderEntity>>();
|
||||
ISecurityGeneratorNumberService securityGeneratorNumberService = service.ServiceProvider.GetService<ISecurityGeneratorNumberService>()!;
|
||||
|
||||
string folderNameParent = folder.FolderName;
|
||||
|
||||
//创建当前目录
|
||||
folder = new DmsFolderEntity();
|
||||
folder.FolderName = securityGeneratorNumberService.GetNo(MasterPrefixPolicy.DMS_FOLDER_DELETE_LOG, MasterPrefixPolicy.DMS_FOLDER_DELETE_LOG_FOLDER_NAME, "DR", YesNoPolicy.NO, "00000000");
|
||||
folder.FolderLocalName = dmsFile.OrgFileName;//如果是目录,这个就是目录名称
|
||||
repositoryFolder.InsertNow(folder);
|
||||
//创建目录关系表
|
||||
DmsFolderMapEntity map = new DmsFolderMapEntity();
|
||||
IRepository<DmsFolderMapEntity> repositoryFolderMap = repository.GetRepository<IRepository<DmsFolderMapEntity>>();
|
||||
map.FolderNameParent = folderNameParent;
|
||||
map.FolderNameSon = folder.FolderName;
|
||||
repositoryFolderMap.InsertNow(map);
|
||||
|
||||
//创建Dms目录,要更新目录名
|
||||
IRepository<DmsFileEntity> repositoryDmsFile = repository.GetRepository<IRepository<DmsFileEntity>>();
|
||||
DmsFileEntity entity = new DmsFileEntity();
|
||||
ObjectCopyHelper.Copy(dmsFile, entity);
|
||||
entity.OrderKey = entity.FileName = folder.FolderName;
|
||||
|
||||
entity.FileId = 0;
|
||||
entity.FilePath = folderNameParent;
|
||||
repositoryDmsFile.InsertNow(entity);
|
||||
|
||||
DmsFileUploadEntity upload = new DmsFileUploadEntity();
|
||||
upload.FileId = entity.FileId;
|
||||
upload.FileCategory = "MASTER";
|
||||
upload.UploadName = securityGeneratorNumberService.GetNo(MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG, MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG_UPLOAD_NAME, "DR", YesNoPolicy.NO, MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG_FORMAT);
|
||||
upload.OrgFileName = entity.OrgFileName;
|
||||
|
||||
IRepository<DmsFileUploadEntity> repositoryUpload = repository.GetRepository<IRepository<DmsFileUploadEntity>>();
|
||||
|
||||
repositoryUpload.InsertNow(upload);
|
||||
|
||||
IRepository<DmsFileDeleteLogEntity> repositoryDmsFileDeleteLog = repository.GetRepository<IRepository<DmsFileDeleteLogEntity>>();
|
||||
//创建所有目录下的内容
|
||||
DmsFileDeleteLogEntity[] dmsFiles = repositoryDmsFileDeleteLog.DetachedEntities.Where(x => x.FilePath == dmsFile.FileName).ToArray();
|
||||
if (dmsFiles == null || dmsFiles.Length == 0) return;
|
||||
|
||||
foreach (var dms in dmsFiles)
|
||||
{
|
||||
RestoreDmsFile(dms, folder);
|
||||
}
|
||||
}
|
||||
|
||||
private void RestoreDmsFile(DmsFileDeleteLogEntity dmsFile, DmsFolderEntity folder)
|
||||
{
|
||||
IRepository<DmsFileEntity> repositoryDmsFile = repository.GetRepository<IRepository<DmsFileEntity>>();
|
||||
IRepository<DmsFileUploadEntity> repositoryDmsFileUpload = repository.GetRepository<IRepository<DmsFileUploadEntity>>();
|
||||
IRepository<DmsFolderEntity> repositoryDmsFolder = repository.GetRepository<IRepository<DmsFolderEntity>>();
|
||||
IRepository<DmsFolderMapEntity> repositoryDmsFolderMap = repository.GetRepository<IRepository<DmsFolderMapEntity>>();
|
||||
|
||||
ISecurityGeneratorNumberService securityGeneratorNumberService = service.ServiceProvider.GetService<ISecurityGeneratorNumberService>()!;
|
||||
|
||||
//如果顶级目录不存在,创建顶级目录
|
||||
if (folder == null)
|
||||
folder = repositoryDmsFolder.DetachedEntities.Where(x => x.FolderLocalName == service.UserId).FirstOrDefault()!;
|
||||
|
||||
if (folder == null)
|
||||
{
|
||||
folder = new DmsFolderEntity();
|
||||
folder.FolderName = securityGeneratorNumberService.GetNo(MasterPrefixPolicy.DMS_FOLDER_DELETE_LOG, MasterPrefixPolicy.DMS_FOLDER_DELETE_LOG_FOLDER_NAME, null, YesNoPolicy.NO, "00000000");
|
||||
folder.FolderLocalName = service.UserId;
|
||||
repositoryDmsFolder.InsertNow(folder);
|
||||
}
|
||||
|
||||
string folderNameParent = folder.FolderName;
|
||||
|
||||
if (dmsFile.IsDirectoryIndc == YesNoPolicy.YES)
|
||||
{
|
||||
RestoreDmsFileByDirectory(dmsFile, folder);
|
||||
return;
|
||||
}
|
||||
|
||||
DmsFileUploadEntity uploadLog = new DmsFileUploadEntity();
|
||||
|
||||
uploadLog.FileCategory = "MASTER";
|
||||
uploadLog.UploadName = securityGeneratorNumberService.GetNo(MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG, MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG_UPLOAD_NAME, "FL", YesNoPolicy.NO, MasterPrefixPolicy.UPLOAD_DMS_FILE_DELETE_LOG_FORMAT);
|
||||
uploadLog.OrgFileName = dmsFile.OrgFileName;
|
||||
|
||||
//创建Dms文件,需更新父目录
|
||||
DmsFileEntity entityLog = new DmsFileEntity();
|
||||
ObjectCopyHelper.Copy(dmsFile, entityLog);
|
||||
entityLog.FilePath = folderNameParent;
|
||||
entityLog.FileId = 0;
|
||||
repositoryDmsFile.InsertNow(entityLog);
|
||||
|
||||
uploadLog.FileId = entityLog.FileId;
|
||||
repositoryDmsFileUpload.InsertNow(uploadLog);
|
||||
|
||||
//创建目录关系表
|
||||
DmsFolderMapEntity mapLog = new DmsFolderMapEntity();
|
||||
mapLog.FolderNameParent = folderNameParent;
|
||||
mapLog.FolderNameSon = entityLog.FileName;
|
||||
repositoryDmsFolderMap.InsertNow(mapLog);
|
||||
}
|
||||
|
||||
|
||||
[PermissionOperate(name: MasterPermissionPolicy.DmsFile, operate: Operate.Delete)]
|
||||
[UnitOfWork]
|
||||
public void DeleteLog(long key)
|
||||
{
|
||||
DeleteLog(key, false);
|
||||
}
|
||||
private void DeleteLog(long key, bool isRestore)
|
||||
{
|
||||
IRepository<DmsFileDeleteLogEntity> repositoryDmsFileDeleteLog = repository.GetRepository<IRepository<DmsFileDeleteLogEntity>>();
|
||||
|
||||
@@ -451,6 +651,8 @@ namespace CloudBuilder.Master.Service
|
||||
|
||||
if (dmsFile == null) return;
|
||||
|
||||
if (isRestore) RestoreDmsFile(dmsFile, null);
|
||||
|
||||
repositoryDmsFileDeleteLog.DeleteNow(dmsFile);
|
||||
|
||||
IRepository<DmsFileUploadDeleteLogEntity> repositoryDmsFileUploadDeleteLog = repository.GetRepository<IRepository<DmsFileUploadDeleteLogEntity>>();
|
||||
@@ -502,7 +704,7 @@ namespace CloudBuilder.Master.Service
|
||||
if (dmsFiles == null || dmsFiles.Length == 0) return;
|
||||
foreach (var dmsFile in dmsFiles)
|
||||
{
|
||||
DeleteLog(dmsFile.FileId);
|
||||
DeleteLog(dmsFile.FileId, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,7 +714,7 @@ namespace CloudBuilder.Master.Service
|
||||
if (dmsFiles == null || dmsFiles.Length == 0) return;
|
||||
foreach (var dmsFile in dmsFiles)
|
||||
{
|
||||
Delete(dmsFile.FileId);
|
||||
Delete(dmsFile.FileId, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,14 @@ builder.Entity<PublishVideoFamilyGroupEntity>().HasKey(c => new {c.FamilyName,c.
|
||||
|
||||
|
||||
|
||||
//***END***
|
||||
|
||||
|
||||
|
||||
builder.Entity<DmsFileUploadDeleteLogViewEntity>(eb => { eb.HasNoKey(); });
|
||||
|
||||
|
||||
builder.Entity<DmsFileUploadDeleteLogViewEntity>(eb => { eb.HasNoKey(); });
|
||||
//***END***
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,14 +14,16 @@ namespace CloudBuilder.Master.Entity
|
||||
{
|
||||
}
|
||||
|
||||
[Column("allow_delete_indc")]
|
||||
public string AllowDeleteIndc { get; set; }
|
||||
[Column("allow_rename_indc")]
|
||||
public string AllowRenameIndc { get; set; }
|
||||
[Column("created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
[Column("created_datetime")]
|
||||
public DateTime CreatedDatetime { get; set; }
|
||||
[Column("created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
[Column("updated_datetime")]
|
||||
public DateTime UpdatedDatetime { get; set; }
|
||||
[Column("updated_by")]
|
||||
public string UpdatedBy { get; set; }
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("file_id")]
|
||||
public long FileId { get; set; }
|
||||
[Column("file_name")]
|
||||
@@ -30,85 +32,79 @@ namespace CloudBuilder.Master.Entity
|
||||
public string FilePath { get; set; }
|
||||
[Column("file_size")]
|
||||
public int FileSize { get; set; }
|
||||
[Column("file_tag")]
|
||||
public string? FileTag { get; set; }
|
||||
[Column("file_type")]
|
||||
public string? FileType { get; set; }
|
||||
[Column("is_directory_indc")]
|
||||
public string IsDirectoryIndc { get; set; }
|
||||
[Column("is_link_indc")]
|
||||
public string IsLinkIndc { get; set; }
|
||||
[Column("landscape_indc")]
|
||||
public string? LandscapeIndc { get; set; }
|
||||
[Column("linked_file_id")]
|
||||
public int LinkedFileId { get; set; }
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("log_id")]
|
||||
public int LogId { get; set; }
|
||||
[Column("order_key")]
|
||||
public string? OrderKey { get; set; }
|
||||
[Column("org_file_name")]
|
||||
public string OrgFileName { get; set; }
|
||||
[Column("ower_id")]
|
||||
public string OwerId { get; set; }
|
||||
[Column("revision_no")]
|
||||
public int RevisionNo { get; set; }
|
||||
[Column("is_directory_indc")]
|
||||
public string IsDirectoryIndc { get; set; }
|
||||
[Column("is_link_indc")]
|
||||
public string IsLinkIndc { get; set; }
|
||||
[Column("linked_file_id")]
|
||||
public int LinkedFileId { get; set; }
|
||||
[Column("org_file_name")]
|
||||
public string OrgFileName { get; set; }
|
||||
[Column("order_key")]
|
||||
public string? OrderKey { get; set; }
|
||||
[Column("file_tag")]
|
||||
public string? FileTag { get; set; }
|
||||
[Column("allow_rename_indc")]
|
||||
public string AllowRenameIndc { get; set; }
|
||||
[Column("allow_delete_indc")]
|
||||
public string AllowDeleteIndc { get; set; }
|
||||
[Column("file_type")]
|
||||
public string? FileType { get; set; }
|
||||
[Column("landscape_indc")]
|
||||
public string? LandscapeIndc { get; set; }
|
||||
[Column("transcode_indc")]
|
||||
public string? TranscodeIndc { get; set; }
|
||||
[Column("updated_by")]
|
||||
public string UpdatedBy { get; set; }
|
||||
[Column("updated_datetime")]
|
||||
public DateTime UpdatedDatetime { get; set; }
|
||||
|
||||
public const string ALLOW_DELETE_INDC = "AllowDeleteIndc";
|
||||
public const string ALLOW_RENAME_INDC = "AllowRenameIndc";
|
||||
public const string CREATED_BY = "CreatedBy";
|
||||
public const string CREATED_DATETIME = "CreatedDatetime";
|
||||
public const string CREATED_BY = "CreatedBy";
|
||||
public const string UPDATED_DATETIME = "UpdatedDatetime";
|
||||
public const string UPDATED_BY = "UpdatedBy";
|
||||
public const string FILE_ID = "FileId";
|
||||
public const string FILE_NAME = "FileName";
|
||||
public const string FILE_PATH = "FilePath";
|
||||
public const string FILE_SIZE = "FileSize";
|
||||
public const string FILE_TAG = "FileTag";
|
||||
public const string FILE_TYPE = "FileType";
|
||||
public const string IS_DIRECTORY_INDC = "IsDirectoryIndc";
|
||||
public const string IS_LINK_INDC = "IsLinkIndc";
|
||||
public const string LANDSCAPE_INDC = "LandscapeIndc";
|
||||
public const string LINKED_FILE_ID = "LinkedFileId";
|
||||
public const string LOG_ID = "LogId";
|
||||
public const string ORDER_KEY = "OrderKey";
|
||||
public const string ORG_FILE_NAME = "OrgFileName";
|
||||
public const string OWER_ID = "OwerId";
|
||||
public const string REVISION_NO = "RevisionNo";
|
||||
public const string IS_DIRECTORY_INDC = "IsDirectoryIndc";
|
||||
public const string IS_LINK_INDC = "IsLinkIndc";
|
||||
public const string LINKED_FILE_ID = "LinkedFileId";
|
||||
public const string ORG_FILE_NAME = "OrgFileName";
|
||||
public const string ORDER_KEY = "OrderKey";
|
||||
public const string FILE_TAG = "FileTag";
|
||||
public const string ALLOW_RENAME_INDC = "AllowRenameIndc";
|
||||
public const string ALLOW_DELETE_INDC = "AllowDeleteIndc";
|
||||
public const string FILE_TYPE = "FileType";
|
||||
public const string LANDSCAPE_INDC = "LandscapeIndc";
|
||||
public const string TRANSCODE_INDC = "TranscodeIndc";
|
||||
public const string UPDATED_BY = "UpdatedBy";
|
||||
public const string UPDATED_DATETIME = "UpdatedDatetime";
|
||||
|
||||
public const string DB_NAME_DMS_FILE_DELETE_LOG = "dms_file_delete_log";
|
||||
public const string DB_NAME_FIELDS="allow_delete_indc,allow_rename_indc,created_by,created_datetime,file_id,file_name,file_path,file_size,file_tag,file_type,is_directory_indc,is_link_indc,landscape_indc,linked_file_id,log_id,order_key,org_file_name,ower_id,revision_no,transcode_indc,updated_by,updated_datetime";
|
||||
public const string DB_NAME_FIELDS="created_datetime,created_by,updated_datetime,updated_by,file_id,file_name,file_path,file_size,ower_id,revision_no,is_directory_indc,is_link_indc,linked_file_id,org_file_name,order_key,file_tag,allow_rename_indc,allow_delete_indc,file_type,landscape_indc,transcode_indc";
|
||||
|
||||
public const string DB_ALLOW_DELETE_INDC = "allow_delete_indc";
|
||||
public const string DB_ALLOW_RENAME_INDC = "allow_rename_indc";
|
||||
public const string DB_CREATED_BY = "created_by";
|
||||
public const string DB_CREATED_DATETIME = "created_datetime";
|
||||
public const string DB_CREATED_BY = "created_by";
|
||||
public const string DB_UPDATED_DATETIME = "updated_datetime";
|
||||
public const string DB_UPDATED_BY = "updated_by";
|
||||
public const string DB_FILE_ID = "file_id";
|
||||
public const string DB_FILE_NAME = "file_name";
|
||||
public const string DB_FILE_PATH = "file_path";
|
||||
public const string DB_FILE_SIZE = "file_size";
|
||||
public const string DB_FILE_TAG = "file_tag";
|
||||
public const string DB_FILE_TYPE = "file_type";
|
||||
public const string DB_IS_DIRECTORY_INDC = "is_directory_indc";
|
||||
public const string DB_IS_LINK_INDC = "is_link_indc";
|
||||
public const string DB_LANDSCAPE_INDC = "landscape_indc";
|
||||
public const string DB_LINKED_FILE_ID = "linked_file_id";
|
||||
public const string DB_LOG_ID = "log_id";
|
||||
public const string DB_ORDER_KEY = "order_key";
|
||||
public const string DB_ORG_FILE_NAME = "org_file_name";
|
||||
public const string DB_OWER_ID = "ower_id";
|
||||
public const string DB_REVISION_NO = "revision_no";
|
||||
public const string DB_IS_DIRECTORY_INDC = "is_directory_indc";
|
||||
public const string DB_IS_LINK_INDC = "is_link_indc";
|
||||
public const string DB_LINKED_FILE_ID = "linked_file_id";
|
||||
public const string DB_ORG_FILE_NAME = "org_file_name";
|
||||
public const string DB_ORDER_KEY = "order_key";
|
||||
public const string DB_FILE_TAG = "file_tag";
|
||||
public const string DB_ALLOW_RENAME_INDC = "allow_rename_indc";
|
||||
public const string DB_ALLOW_DELETE_INDC = "allow_delete_indc";
|
||||
public const string DB_FILE_TYPE = "file_type";
|
||||
public const string DB_LANDSCAPE_INDC = "landscape_indc";
|
||||
public const string DB_TRANSCODE_INDC = "transcode_indc";
|
||||
public const string DB_UPDATED_BY = "updated_by";
|
||||
public const string DB_UPDATED_DATETIME = "updated_datetime";
|
||||
|
||||
private string ProviderName { get; set; }
|
||||
|
||||
@@ -129,35 +125,34 @@ namespace CloudBuilder.Master.Entity
|
||||
throw new NullReferenceException("Source entity is null.");
|
||||
}
|
||||
|
||||
this.AllowDeleteIndc = source.AllowDeleteIndc;
|
||||
this.AllowRenameIndc = source.AllowRenameIndc;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.CreatedDatetime = source.CreatedDatetime;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.UpdatedDatetime = source.UpdatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.FileId = source.FileId;
|
||||
this.FileName = source.FileName;
|
||||
this.FilePath = source.FilePath;
|
||||
this.FileSize = source.FileSize;
|
||||
this.FileTag = source.FileTag;
|
||||
this.FileType = source.FileType;
|
||||
this.IsDirectoryIndc = source.IsDirectoryIndc;
|
||||
this.IsLinkIndc = source.IsLinkIndc;
|
||||
this.LandscapeIndc = source.LandscapeIndc;
|
||||
this.LinkedFileId = source.LinkedFileId;
|
||||
this.LogId = source.LogId;
|
||||
this.OrderKey = source.OrderKey;
|
||||
this.OrgFileName = source.OrgFileName;
|
||||
this.OwerId = source.OwerId;
|
||||
this.RevisionNo = source.RevisionNo;
|
||||
this.IsDirectoryIndc = source.IsDirectoryIndc;
|
||||
this.IsLinkIndc = source.IsLinkIndc;
|
||||
this.LinkedFileId = source.LinkedFileId;
|
||||
this.OrgFileName = source.OrgFileName;
|
||||
this.OrderKey = source.OrderKey;
|
||||
this.FileTag = source.FileTag;
|
||||
this.AllowRenameIndc = source.AllowRenameIndc;
|
||||
this.AllowDeleteIndc = source.AllowDeleteIndc;
|
||||
this.FileType = source.FileType;
|
||||
this.LandscapeIndc = source.LandscapeIndc;
|
||||
this.TranscodeIndc = source.TranscodeIndc;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.UpdatedDatetime = source.UpdatedDatetime;
|
||||
|
||||
if (includeSystemFields)
|
||||
{
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.CreatedDatetime = source.CreatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.UpdatedDatetime = source.UpdatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -229,7 +224,7 @@ namespace CloudBuilder.Master.Entity
|
||||
public string GetSelectTopFromByMySql(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||
{
|
||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_LOG_ID ;
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FILE_ID ;
|
||||
int offset = limit * (start - 1);
|
||||
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FILE_DELETE_LOG} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
|
||||
}
|
||||
@@ -237,7 +232,7 @@ namespace CloudBuilder.Master.Entity
|
||||
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||
{
|
||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_LOG_ID ;
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FILE_ID ;
|
||||
string top = limit > 0 ? $"top {limit}" : "";
|
||||
return $" select {top} {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FILE_DELETE_LOG} with(nolock) where 1=1 {sqlWhere} ) a where num> {limit * (start - 1)}";
|
||||
}
|
||||
|
||||
@@ -14,44 +14,44 @@ namespace CloudBuilder.Master.Entity
|
||||
{
|
||||
}
|
||||
|
||||
[Column("created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
[Column("created_datetime")]
|
||||
public DateTime CreatedDatetime { get; set; }
|
||||
[Column("file_category")]
|
||||
public string FileCategory { get; set; }
|
||||
[Column("created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
[Column("updated_datetime")]
|
||||
public DateTime UpdatedDatetime { get; set; }
|
||||
[Column("updated_by")]
|
||||
public string UpdatedBy { get; set; }
|
||||
[Key]
|
||||
[Column("file_id")]
|
||||
public long FileId { get; set; }
|
||||
[Column("org_file_name")]
|
||||
public string OrgFileName { get; set; }
|
||||
[Column("updated_by")]
|
||||
public string UpdatedBy { get; set; }
|
||||
[Column("updated_datetime")]
|
||||
public DateTime UpdatedDatetime { get; set; }
|
||||
[Column("upload_name")]
|
||||
public string UploadName { get; set; }
|
||||
[Column("file_category")]
|
||||
public string FileCategory { get; set; }
|
||||
[Column("org_file_name")]
|
||||
public string OrgFileName { get; set; }
|
||||
|
||||
public const string CREATED_BY = "CreatedBy";
|
||||
public const string CREATED_DATETIME = "CreatedDatetime";
|
||||
public const string FILE_CATEGORY = "FileCategory";
|
||||
public const string FILE_ID = "FileId";
|
||||
public const string ORG_FILE_NAME = "OrgFileName";
|
||||
public const string UPDATED_BY = "UpdatedBy";
|
||||
public const string CREATED_BY = "CreatedBy";
|
||||
public const string UPDATED_DATETIME = "UpdatedDatetime";
|
||||
public const string UPDATED_BY = "UpdatedBy";
|
||||
public const string FILE_ID = "FileId";
|
||||
public const string UPLOAD_NAME = "UploadName";
|
||||
public const string FILE_CATEGORY = "FileCategory";
|
||||
public const string ORG_FILE_NAME = "OrgFileName";
|
||||
|
||||
public const string DB_NAME_DMS_FILE_UPLOAD_DELETE_LOG = "dms_file_upload_delete_log";
|
||||
public const string DB_NAME_FIELDS="created_by,created_datetime,file_category,file_id,org_file_name,updated_by,updated_datetime,upload_name";
|
||||
public const string DB_NAME_FIELDS="created_datetime,created_by,updated_datetime,updated_by,file_id,upload_name,file_category,org_file_name";
|
||||
|
||||
public const string DB_CREATED_BY = "created_by";
|
||||
public const string DB_CREATED_DATETIME = "created_datetime";
|
||||
public const string DB_FILE_CATEGORY = "file_category";
|
||||
public const string DB_FILE_ID = "file_id";
|
||||
public const string DB_ORG_FILE_NAME = "org_file_name";
|
||||
public const string DB_UPDATED_BY = "updated_by";
|
||||
public const string DB_CREATED_BY = "created_by";
|
||||
public const string DB_UPDATED_DATETIME = "updated_datetime";
|
||||
public const string DB_UPDATED_BY = "updated_by";
|
||||
public const string DB_FILE_ID = "file_id";
|
||||
public const string DB_UPLOAD_NAME = "upload_name";
|
||||
public const string DB_FILE_CATEGORY = "file_category";
|
||||
public const string DB_ORG_FILE_NAME = "org_file_name";
|
||||
|
||||
private string ProviderName { get; set; }
|
||||
|
||||
@@ -72,21 +72,21 @@ namespace CloudBuilder.Master.Entity
|
||||
throw new NullReferenceException("Source entity is null.");
|
||||
}
|
||||
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.CreatedDatetime = source.CreatedDatetime;
|
||||
this.FileCategory = source.FileCategory;
|
||||
this.FileId = source.FileId;
|
||||
this.OrgFileName = source.OrgFileName;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.UpdatedDatetime = source.UpdatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.FileId = source.FileId;
|
||||
this.UploadName = source.UploadName;
|
||||
this.FileCategory = source.FileCategory;
|
||||
this.OrgFileName = source.OrgFileName;
|
||||
|
||||
if (includeSystemFields)
|
||||
{
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.CreatedDatetime = source.CreatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.UpdatedDatetime = source.UpdatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,102 +14,102 @@ namespace CloudBuilder.Master.Entity
|
||||
{
|
||||
}
|
||||
|
||||
[Column("allow_delete_indc")]
|
||||
public string AllowDeleteIndc { get; set; }
|
||||
[Column("allow_rename_indc")]
|
||||
public string AllowRenameIndc { get; set; }
|
||||
[Column("created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
[Column("created_datetime")]
|
||||
public DateTime CreatedDatetime { get; set; }
|
||||
[Column("file_category")]
|
||||
public string FileCategory { get; set; }
|
||||
[Column("created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
[Column("file_id")]
|
||||
public long FileId { get; set; }
|
||||
[Column("upload_name")]
|
||||
public string UploadName { get; set; }
|
||||
[Column("file_category")]
|
||||
public string FileCategory { get; set; }
|
||||
[Column("org_file_name")]
|
||||
public string OrgFileName { get; set; }
|
||||
[Column("file_name")]
|
||||
public string FileName { get; set; }
|
||||
[Column("file_path")]
|
||||
public string FilePath { get; set; }
|
||||
[Column("file_size")]
|
||||
public int FileSize { get; set; }
|
||||
[Column("file_tag")]
|
||||
public string? FileTag { get; set; }
|
||||
[Column("file_type")]
|
||||
public string? FileType { get; set; }
|
||||
[Column("folder_local_name")]
|
||||
public string? FolderLocalName { get; set; }
|
||||
[Column("is_directory_indc")]
|
||||
public string IsDirectoryIndc { get; set; }
|
||||
[Column("is_link_indc")]
|
||||
public string IsLinkIndc { get; set; }
|
||||
[Column("landscape_indc")]
|
||||
public string? LandscapeIndc { get; set; }
|
||||
[Column("linked_file_id")]
|
||||
public int LinkedFileId { get; set; }
|
||||
[Column("order_key")]
|
||||
public string? OrderKey { get; set; }
|
||||
[Column("org_file_name")]
|
||||
public string OrgFileName { get; set; }
|
||||
[Column("file_size")]
|
||||
public int FileSize { get; set; }
|
||||
[Column("ower_id")]
|
||||
public string OwerId { get; set; }
|
||||
[Column("revision_no")]
|
||||
public int RevisionNo { get; set; }
|
||||
[Column("is_directory_indc")]
|
||||
public string IsDirectoryIndc { get; set; }
|
||||
[Column("is_link_indc")]
|
||||
public string IsLinkIndc { get; set; }
|
||||
[Column("linked_file_id")]
|
||||
public int LinkedFileId { get; set; }
|
||||
[Column("order_key")]
|
||||
public string? OrderKey { get; set; }
|
||||
[Column("file_tag")]
|
||||
public string? FileTag { get; set; }
|
||||
[Column("allow_rename_indc")]
|
||||
public string AllowRenameIndc { get; set; }
|
||||
[Column("allow_delete_indc")]
|
||||
public string AllowDeleteIndc { get; set; }
|
||||
[Column("file_type")]
|
||||
public string? FileType { get; set; }
|
||||
[Column("landscape_indc")]
|
||||
public string? LandscapeIndc { get; set; }
|
||||
[Column("transcode_indc")]
|
||||
public string? TranscodeIndc { get; set; }
|
||||
[Column("upload_name")]
|
||||
public string UploadName { get; set; }
|
||||
[Column("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
public const string ALLOW_DELETE_INDC = "AllowDeleteIndc";
|
||||
public const string ALLOW_RENAME_INDC = "AllowRenameIndc";
|
||||
public const string CREATED_BY = "CreatedBy";
|
||||
public const string CREATED_DATETIME = "CreatedDatetime";
|
||||
public const string FILE_CATEGORY = "FileCategory";
|
||||
public const string CREATED_BY = "CreatedBy";
|
||||
public const string FILE_ID = "FileId";
|
||||
public const string UPLOAD_NAME = "UploadName";
|
||||
public const string FILE_CATEGORY = "FileCategory";
|
||||
public const string ORG_FILE_NAME = "OrgFileName";
|
||||
public const string FILE_NAME = "FileName";
|
||||
public const string FILE_PATH = "FilePath";
|
||||
public const string FILE_SIZE = "FileSize";
|
||||
public const string FILE_TAG = "FileTag";
|
||||
public const string FILE_TYPE = "FileType";
|
||||
public const string FOLDER_LOCAL_NAME = "FolderLocalName";
|
||||
public const string IS_DIRECTORY_INDC = "IsDirectoryIndc";
|
||||
public const string IS_LINK_INDC = "IsLinkIndc";
|
||||
public const string LANDSCAPE_INDC = "LandscapeIndc";
|
||||
public const string LINKED_FILE_ID = "LinkedFileId";
|
||||
public const string ORDER_KEY = "OrderKey";
|
||||
public const string ORG_FILE_NAME = "OrgFileName";
|
||||
public const string FILE_SIZE = "FileSize";
|
||||
public const string OWER_ID = "OwerId";
|
||||
public const string REVISION_NO = "RevisionNo";
|
||||
public const string IS_DIRECTORY_INDC = "IsDirectoryIndc";
|
||||
public const string IS_LINK_INDC = "IsLinkIndc";
|
||||
public const string LINKED_FILE_ID = "LinkedFileId";
|
||||
public const string ORDER_KEY = "OrderKey";
|
||||
public const string FILE_TAG = "FileTag";
|
||||
public const string ALLOW_RENAME_INDC = "AllowRenameIndc";
|
||||
public const string ALLOW_DELETE_INDC = "AllowDeleteIndc";
|
||||
public const string FILE_TYPE = "FileType";
|
||||
public const string LANDSCAPE_INDC = "LandscapeIndc";
|
||||
public const string TRANSCODE_INDC = "TranscodeIndc";
|
||||
public const string UPLOAD_NAME = "UploadName";
|
||||
public const string URL = "Url";
|
||||
|
||||
public const string DB_NAME_DMS_FILE_UPLOAD_DELETE_LOG_VIEW = "dms_file_upload_delete_log_view";
|
||||
public const string DB_NAME_FIELDS="allow_delete_indc,allow_rename_indc,created_by,created_datetime,file_category,file_id,file_name,file_path,file_size,file_tag,file_type,folder_local_name,is_directory_indc,is_link_indc,landscape_indc,linked_file_id,order_key,org_file_name,ower_id,revision_no,transcode_indc,upload_name,url";
|
||||
public const string DB_NAME_FIELDS="created_datetime,created_by,file_id,upload_name,file_category,org_file_name,file_name,file_path,folder_local_name,file_size,ower_id,revision_no,is_directory_indc,is_link_indc,linked_file_id,order_key,file_tag,allow_rename_indc,allow_delete_indc,file_type,landscape_indc,transcode_indc,url";
|
||||
|
||||
public const string DB_ALLOW_DELETE_INDC = "allow_delete_indc";
|
||||
public const string DB_ALLOW_RENAME_INDC = "allow_rename_indc";
|
||||
public const string DB_CREATED_BY = "created_by";
|
||||
public const string DB_CREATED_DATETIME = "created_datetime";
|
||||
public const string DB_FILE_CATEGORY = "file_category";
|
||||
public const string DB_CREATED_BY = "created_by";
|
||||
public const string DB_FILE_ID = "file_id";
|
||||
public const string DB_UPLOAD_NAME = "upload_name";
|
||||
public const string DB_FILE_CATEGORY = "file_category";
|
||||
public const string DB_ORG_FILE_NAME = "org_file_name";
|
||||
public const string DB_FILE_NAME = "file_name";
|
||||
public const string DB_FILE_PATH = "file_path";
|
||||
public const string DB_FILE_SIZE = "file_size";
|
||||
public const string DB_FILE_TAG = "file_tag";
|
||||
public const string DB_FILE_TYPE = "file_type";
|
||||
public const string DB_FOLDER_LOCAL_NAME = "folder_local_name";
|
||||
public const string DB_IS_DIRECTORY_INDC = "is_directory_indc";
|
||||
public const string DB_IS_LINK_INDC = "is_link_indc";
|
||||
public const string DB_LANDSCAPE_INDC = "landscape_indc";
|
||||
public const string DB_LINKED_FILE_ID = "linked_file_id";
|
||||
public const string DB_ORDER_KEY = "order_key";
|
||||
public const string DB_ORG_FILE_NAME = "org_file_name";
|
||||
public const string DB_FILE_SIZE = "file_size";
|
||||
public const string DB_OWER_ID = "ower_id";
|
||||
public const string DB_REVISION_NO = "revision_no";
|
||||
public const string DB_IS_DIRECTORY_INDC = "is_directory_indc";
|
||||
public const string DB_IS_LINK_INDC = "is_link_indc";
|
||||
public const string DB_LINKED_FILE_ID = "linked_file_id";
|
||||
public const string DB_ORDER_KEY = "order_key";
|
||||
public const string DB_FILE_TAG = "file_tag";
|
||||
public const string DB_ALLOW_RENAME_INDC = "allow_rename_indc";
|
||||
public const string DB_ALLOW_DELETE_INDC = "allow_delete_indc";
|
||||
public const string DB_FILE_TYPE = "file_type";
|
||||
public const string DB_LANDSCAPE_INDC = "landscape_indc";
|
||||
public const string DB_TRANSCODE_INDC = "transcode_indc";
|
||||
public const string DB_UPLOAD_NAME = "upload_name";
|
||||
public const string DB_URL = "url";
|
||||
|
||||
private string ProviderName { get; set; }
|
||||
@@ -131,34 +131,34 @@ namespace CloudBuilder.Master.Entity
|
||||
throw new NullReferenceException("Source entity is null.");
|
||||
}
|
||||
|
||||
this.AllowDeleteIndc = source.AllowDeleteIndc;
|
||||
this.AllowRenameIndc = source.AllowRenameIndc;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.CreatedDatetime = source.CreatedDatetime;
|
||||
this.FileCategory = source.FileCategory;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.FileId = source.FileId;
|
||||
this.UploadName = source.UploadName;
|
||||
this.FileCategory = source.FileCategory;
|
||||
this.OrgFileName = source.OrgFileName;
|
||||
this.FileName = source.FileName;
|
||||
this.FilePath = source.FilePath;
|
||||
this.FileSize = source.FileSize;
|
||||
this.FileTag = source.FileTag;
|
||||
this.FileType = source.FileType;
|
||||
this.FolderLocalName = source.FolderLocalName;
|
||||
this.IsDirectoryIndc = source.IsDirectoryIndc;
|
||||
this.IsLinkIndc = source.IsLinkIndc;
|
||||
this.LandscapeIndc = source.LandscapeIndc;
|
||||
this.LinkedFileId = source.LinkedFileId;
|
||||
this.OrderKey = source.OrderKey;
|
||||
this.OrgFileName = source.OrgFileName;
|
||||
this.FileSize = source.FileSize;
|
||||
this.OwerId = source.OwerId;
|
||||
this.RevisionNo = source.RevisionNo;
|
||||
this.IsDirectoryIndc = source.IsDirectoryIndc;
|
||||
this.IsLinkIndc = source.IsLinkIndc;
|
||||
this.LinkedFileId = source.LinkedFileId;
|
||||
this.OrderKey = source.OrderKey;
|
||||
this.FileTag = source.FileTag;
|
||||
this.AllowRenameIndc = source.AllowRenameIndc;
|
||||
this.AllowDeleteIndc = source.AllowDeleteIndc;
|
||||
this.FileType = source.FileType;
|
||||
this.LandscapeIndc = source.LandscapeIndc;
|
||||
this.TranscodeIndc = source.TranscodeIndc;
|
||||
this.UploadName = source.UploadName;
|
||||
this.Url = source.Url;
|
||||
|
||||
if (includeSystemFields)
|
||||
{
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.CreatedDatetime = source.CreatedDatetime;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace CloudBuilder.Master.Entity
|
||||
{
|
||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ALLOW_DELETE_INDC ; int offset = limit * (start - 1);
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_CREATED_DATETIME ; int offset = limit * (start - 1);
|
||||
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FILE_UPLOAD_DELETE_LOG_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace CloudBuilder.Master.Entity
|
||||
{
|
||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ALLOW_DELETE_INDC ; string top = limit > 0 ? $"top {limit}" : "";
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_CREATED_DATETIME ; string top = limit > 0 ? $"top {limit}" : "";
|
||||
return $" select {top} {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FILE_UPLOAD_DELETE_LOG_VIEW} with(nolock) where 1=1 {sqlWhere} ) a where num> {limit * (start - 1)}";
|
||||
}
|
||||
|
||||
|
||||
@@ -14,45 +14,41 @@ namespace CloudBuilder.Master.Entity
|
||||
{
|
||||
}
|
||||
|
||||
[Column("created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
[Column("created_datetime")]
|
||||
public DateTime CreatedDatetime { get; set; }
|
||||
[Column("folder_id")]
|
||||
public int FolderId { get; set; }
|
||||
[Column("folder_local_name")]
|
||||
public string? FolderLocalName { get; set; }
|
||||
[Column("folder_name")]
|
||||
public string FolderName { get; set; }
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("log_id")]
|
||||
public long LogId { get; set; }
|
||||
[Column("updated_by")]
|
||||
public string UpdatedBy { get; set; }
|
||||
[Column("created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
[Column("updated_datetime")]
|
||||
public DateTime UpdatedDatetime { get; set; }
|
||||
[Column("updated_by")]
|
||||
public string UpdatedBy { get; set; }
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("folder_id")]
|
||||
public long FolderId { get; set; }
|
||||
[Column("folder_name")]
|
||||
public string FolderName { get; set; }
|
||||
[Column("folder_local_name")]
|
||||
public string? FolderLocalName { get; set; }
|
||||
|
||||
public const string CREATED_BY = "CreatedBy";
|
||||
public const string CREATED_DATETIME = "CreatedDatetime";
|
||||
public const string FOLDER_ID = "FolderId";
|
||||
public const string FOLDER_LOCAL_NAME = "FolderLocalName";
|
||||
public const string FOLDER_NAME = "FolderName";
|
||||
public const string LOG_ID = "LogId";
|
||||
public const string UPDATED_BY = "UpdatedBy";
|
||||
public const string CREATED_BY = "CreatedBy";
|
||||
public const string UPDATED_DATETIME = "UpdatedDatetime";
|
||||
public const string UPDATED_BY = "UpdatedBy";
|
||||
public const string FOLDER_ID = "FolderId";
|
||||
public const string FOLDER_NAME = "FolderName";
|
||||
public const string FOLDER_LOCAL_NAME = "FolderLocalName";
|
||||
|
||||
public const string DB_NAME_DMS_FOLDER_DELETE_LOG = "dms_folder_delete_log";
|
||||
public const string DB_NAME_FIELDS="created_by,created_datetime,folder_id,folder_local_name,folder_name,log_id,updated_by,updated_datetime";
|
||||
public const string DB_NAME_FIELDS="created_datetime,created_by,updated_datetime,updated_by,folder_id,folder_name,folder_local_name";
|
||||
|
||||
public const string DB_CREATED_BY = "created_by";
|
||||
public const string DB_CREATED_DATETIME = "created_datetime";
|
||||
public const string DB_FOLDER_ID = "folder_id";
|
||||
public const string DB_FOLDER_LOCAL_NAME = "folder_local_name";
|
||||
public const string DB_FOLDER_NAME = "folder_name";
|
||||
public const string DB_LOG_ID = "log_id";
|
||||
public const string DB_UPDATED_BY = "updated_by";
|
||||
public const string DB_CREATED_BY = "created_by";
|
||||
public const string DB_UPDATED_DATETIME = "updated_datetime";
|
||||
public const string DB_UPDATED_BY = "updated_by";
|
||||
public const string DB_FOLDER_ID = "folder_id";
|
||||
public const string DB_FOLDER_NAME = "folder_name";
|
||||
public const string DB_FOLDER_LOCAL_NAME = "folder_local_name";
|
||||
|
||||
private string ProviderName { get; set; }
|
||||
|
||||
@@ -73,21 +69,20 @@ namespace CloudBuilder.Master.Entity
|
||||
throw new NullReferenceException("Source entity is null.");
|
||||
}
|
||||
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.CreatedDatetime = source.CreatedDatetime;
|
||||
this.FolderId = source.FolderId;
|
||||
this.FolderLocalName = source.FolderLocalName;
|
||||
this.FolderName = source.FolderName;
|
||||
this.LogId = source.LogId;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.UpdatedDatetime = source.UpdatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.FolderId = source.FolderId;
|
||||
this.FolderName = source.FolderName;
|
||||
this.FolderLocalName = source.FolderLocalName;
|
||||
|
||||
if (includeSystemFields)
|
||||
{
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.CreatedDatetime = source.CreatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.UpdatedDatetime = source.UpdatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +154,7 @@ namespace CloudBuilder.Master.Entity
|
||||
public string GetSelectTopFromByMySql(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||
{
|
||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_LOG_ID ;
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FOLDER_ID ;
|
||||
int offset = limit * (start - 1);
|
||||
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FOLDER_DELETE_LOG} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
|
||||
}
|
||||
@@ -167,7 +162,7 @@ namespace CloudBuilder.Master.Entity
|
||||
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
|
||||
{
|
||||
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_LOG_ID ;
|
||||
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FOLDER_ID ;
|
||||
string top = limit > 0 ? $"top {limit}" : "";
|
||||
return $" select {top} {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FOLDER_DELETE_LOG} with(nolock) where 1=1 {sqlWhere} ) a where num> {limit * (start - 1)}";
|
||||
}
|
||||
|
||||
@@ -14,39 +14,39 @@ namespace CloudBuilder.Master.Entity
|
||||
{
|
||||
}
|
||||
|
||||
[Column("created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
[Column("created_datetime")]
|
||||
public DateTime CreatedDatetime { get; set; }
|
||||
[Column("created_by")]
|
||||
public string CreatedBy { get; set; }
|
||||
[Column("updated_datetime")]
|
||||
public DateTime UpdatedDatetime { get; set; }
|
||||
[Column("updated_by")]
|
||||
public string UpdatedBy { get; set; }
|
||||
[Column("folder_name_parent")]
|
||||
public string FolderNameParent { get; set; }
|
||||
[Column("folder_name_son")]
|
||||
public string FolderNameSon { get; set; }
|
||||
[Column("orderby")]
|
||||
public int Orderby { get; set; }
|
||||
[Column("updated_by")]
|
||||
public string UpdatedBy { get; set; }
|
||||
[Column("updated_datetime")]
|
||||
public DateTime UpdatedDatetime { get; set; }
|
||||
|
||||
public const string CREATED_BY = "CreatedBy";
|
||||
public const string CREATED_DATETIME = "CreatedDatetime";
|
||||
public const string CREATED_BY = "CreatedBy";
|
||||
public const string UPDATED_DATETIME = "UpdatedDatetime";
|
||||
public const string UPDATED_BY = "UpdatedBy";
|
||||
public const string FOLDER_NAME_PARENT = "FolderNameParent";
|
||||
public const string FOLDER_NAME_SON = "FolderNameSon";
|
||||
public const string ORDERBY = "Orderby";
|
||||
public const string UPDATED_BY = "UpdatedBy";
|
||||
public const string UPDATED_DATETIME = "UpdatedDatetime";
|
||||
|
||||
public const string DB_NAME_DMS_FOLDER_MAP_DELETE_LOG = "dms_folder_map_delete_log";
|
||||
public const string DB_NAME_FIELDS="created_by,created_datetime,folder_name_parent,folder_name_son,orderby,updated_by,updated_datetime";
|
||||
public const string DB_NAME_FIELDS="created_datetime,created_by,updated_datetime,updated_by,folder_name_parent,folder_name_son,orderby";
|
||||
|
||||
public const string DB_CREATED_BY = "created_by";
|
||||
public const string DB_CREATED_DATETIME = "created_datetime";
|
||||
public const string DB_CREATED_BY = "created_by";
|
||||
public const string DB_UPDATED_DATETIME = "updated_datetime";
|
||||
public const string DB_UPDATED_BY = "updated_by";
|
||||
public const string DB_FOLDER_NAME_PARENT = "folder_name_parent";
|
||||
public const string DB_FOLDER_NAME_SON = "folder_name_son";
|
||||
public const string DB_ORDERBY = "orderby";
|
||||
public const string DB_UPDATED_BY = "updated_by";
|
||||
public const string DB_UPDATED_DATETIME = "updated_datetime";
|
||||
|
||||
private string ProviderName { get; set; }
|
||||
|
||||
@@ -67,20 +67,20 @@ namespace CloudBuilder.Master.Entity
|
||||
throw new NullReferenceException("Source entity is null.");
|
||||
}
|
||||
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.CreatedDatetime = source.CreatedDatetime;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.UpdatedDatetime = source.UpdatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.FolderNameParent = source.FolderNameParent;
|
||||
this.FolderNameSon = source.FolderNameSon;
|
||||
this.Orderby = source.Orderby;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.UpdatedDatetime = source.UpdatedDatetime;
|
||||
|
||||
if (includeSystemFields)
|
||||
{
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.CreatedDatetime = source.CreatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
this.CreatedBy = source.CreatedBy;
|
||||
this.UpdatedDatetime = source.UpdatedDatetime;
|
||||
this.UpdatedBy = source.UpdatedBy;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,5 +36,13 @@ namespace CloudBuilder.Master.Policy
|
||||
|
||||
public const string AUDIO_PUBLISH = "AUDIO_PUBLISH";
|
||||
public const string AUDIO_PUBLISH_PUBLISH_NAME = "PUBLISH_NAME";
|
||||
|
||||
|
||||
public const string DMS_FOLDER_DELETE_LOG = "DMS_FOLDER_DELETE_LOG";
|
||||
public const string DMS_FOLDER_DELETE_LOG_FOLDER_NAME = "FOLDER_NAME";
|
||||
|
||||
public const string UPLOAD_DMS_FILE_DELETE_LOG = "DMS_FOLDER_DELETE_LOG";
|
||||
public const string UPLOAD_DMS_FILE_DELETE_LOG_UPLOAD_NAME = "UPLOAD_NAME";
|
||||
public const string UPLOAD_DMS_FILE_DELETE_LOG_FORMAT = "00000000";
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ namespace CloudBuilder.Master.Service
|
||||
|
||||
DmsFileEntity CreateDmsFile(DmsFileEntity dmsFile);
|
||||
string CreateDmsFolder(DmsFileEntity dmsFile);
|
||||
void RestoreDmsFile(long fileId);
|
||||
|
||||
void UpdateDmsFolder(DmsFileEntity dmsFile);
|
||||
|
||||
|
||||
@@ -63,6 +63,10 @@ return Task.Run(() => serviceRequest.PostAsJsonAsync<DmsFileEntity,DmsFileEnti
|
||||
{
|
||||
Task.Run(() => serviceRequest.PostAsync("/DmsFile/Delete?key=" + key.ToString())).GetAwaiter().GetResult(); }
|
||||
|
||||
public void RestoreDmsFile(Int64 key)
|
||||
{
|
||||
Task.Run(() => serviceRequest.PostAsync("/DmsFile/RestoreDmsFile?key=" + key.ToString())).GetAwaiter().GetResult(); }
|
||||
|
||||
public void DeleteLog(Int64 key)
|
||||
{
|
||||
Task.Run(() => serviceRequest.PostAsync("/DmsFile/DeleteLog?key=" + key.ToString())).GetAwaiter().GetResult(); }
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="A" xml:space="preserve">
|
||||
<value>Audio</value>
|
||||
</data>
|
||||
<data name="D" xml:space="preserve">
|
||||
<value>Document</value>
|
||||
</data>
|
||||
<data name="L" xml:space="preserve">
|
||||
<value>Lyric</value>
|
||||
</data>
|
||||
<data name="P" xml:space="preserve">
|
||||
<value>Picture</value>
|
||||
</data>
|
||||
<data name="V" xml:space="preserve">
|
||||
<value>Video</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="A" xml:space="preserve">
|
||||
<value>音频</value>
|
||||
</data>
|
||||
<data name="D" xml:space="preserve">
|
||||
<value>文档</value>
|
||||
</data>
|
||||
<data name="L" xml:space="preserve">
|
||||
<value>歌词</value>
|
||||
</data>
|
||||
<data name="P" xml:space="preserve">
|
||||
<value>图片</value>
|
||||
</data>
|
||||
<data name="V" xml:space="preserve">
|
||||
<value>视频</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -219,6 +219,26 @@ this.dmsFileService= dmsFileService;
|
||||
{
|
||||
dmsFileService.Delete(key);
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "DmsFile", operate: "Insert")]
|
||||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
public dynamic RestoreDmsFile(Int64 key){
|
||||
try
|
||||
{
|
||||
dmsFileService.RestoreDmsFile(key);
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
|
||||
Reference in new issue
Block a user