ow
This commit is contained in:
1 parent
9b01c4a57a
commit
6417562c4f
37 files changed
+2767
-202
No files matched your search
@@ -555,6 +555,47 @@ this.dmsFileService= dmsFileService;
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "DmsFile", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic GetMyStorageUsage()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = dmsFileService.GetMyStorageUsage();
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "DmsFile", operate: "Insert")]
|
||||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
public dynamic UploadUserAvatar()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = dmsFileService.UploadUserAvatar();
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "DmsFile", operate: "Find")]
|
||||
|
||||
@@ -331,6 +331,226 @@ this.familyTreeService= familyTreeService;
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "FamilyTree", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic GetExchangeFactor()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = familyTreeService.GetExchangeFactor();
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ExportFamilyTreeCompositionData
|
||||
{
|
||||
public string treeId { get; set; }
|
||||
public string scope { get; set; }
|
||||
public string anchorPersonId { get; set; }
|
||||
|
||||
}
|
||||
[PermissionOperate(name: "FamilyTree", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic ExportFamilyTree(ExportFamilyTreeCompositionData compositionData)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = familyTreeService.ExportFamilyTree(compositionData.treeId,compositionData.scope,compositionData.anchorPersonId);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class SaveExchangeFileCompositionData
|
||||
{
|
||||
public string fileName { get; set; }
|
||||
public string contentBase64 { get; set; }
|
||||
|
||||
}
|
||||
[PermissionOperate(name: "FamilyTree", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic SaveExchangeFile(SaveExchangeFileCompositionData compositionData)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = familyTreeService.SaveExchangeFile(compositionData.fileName,compositionData.contentBase64);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "FamilyTree", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic ListExchangeFiles(string treeId)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = familyTreeService.ListExchangeFiles(treeId);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "FamilyTree", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic ReadExchangeFile(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = familyTreeService.ReadExchangeFile(fileName);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ImportFamilyTreeCompositionData
|
||||
{
|
||||
public string targetTreeId { get; set; }
|
||||
public FamilyTreeExchangeData data { get; set; }
|
||||
|
||||
}
|
||||
[PermissionOperate(name: "FamilyTree", operate: "Update")]
|
||||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
public dynamic ImportFamilyTree(ImportFamilyTreeCompositionData compositionData)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = familyTreeService.ImportFamilyTree(compositionData.targetTreeId,compositionData.data);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ImportSubTreeCompositionData
|
||||
{
|
||||
public string targetTreeId { get; set; }
|
||||
public string anchorPersonId { get; set; }
|
||||
public FamilyTreeExchangeData data { get; set; }
|
||||
|
||||
}
|
||||
[PermissionOperate(name: "FamilyTree", operate: "Update")]
|
||||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
public dynamic ImportSubTree(ImportSubTreeCompositionData compositionData)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = familyTreeService.ImportSubTree(compositionData.targetTreeId,compositionData.anchorPersonId,compositionData.data);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[PermissionOperate(name: "FamilyTree", operate: "Find")]
|
||||
[HttpPost]
|
||||
public dynamic ListBackups(string treeId)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = familyTreeService.ListBackups(treeId);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class RestoreBackupCompositionData
|
||||
{
|
||||
public string targetTreeId { get; set; }
|
||||
public string backupFileName { get; set; }
|
||||
|
||||
}
|
||||
[PermissionOperate(name: "FamilyTree", operate: "Update")]
|
||||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
public dynamic RestoreBackup(RestoreBackupCompositionData compositionData)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = familyTreeService.RestoreBackup(compositionData.targetTreeId,compositionData.backupFileName);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -88,6 +88,13 @@
|
||||
"DescKey": "052636a8b1469efdf5dc0034a3c5bb34",
|
||||
"DefaultActor": "VIEW_SYSTEM"
|
||||
},
|
||||
"NetDiskQuota": {
|
||||
"//": "网盘额度,按 security_user.user_type 取:U=未认证/N=普通用户/V=VIP/S=SVIP;值支持 T/G/M/K 单位(大小写兼容),解析后换算为 KB(dms_file.file_size 单位即 KB)",
|
||||
"U": "2G",
|
||||
"N": "100G",
|
||||
"V": "500G",
|
||||
"S": "1T"
|
||||
},
|
||||
"IpRateLimiting": {
|
||||
"EnableEndpointRateLimiting": true, //False: globally executed, true: executed for each
|
||||
"StackBlockedRequests": false, //False: Number of rejections should be recorded on another counter
|
||||
|
||||
Reference in new issue
Block a user