整理命名空间
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
fc30cb39ee
commit
103d4b42a3
|
@ -29,7 +29,7 @@
|
||||||
<param name="doctorId"></param>
|
<param name="doctorId"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Api.Controllers.ExtraController.Login(IRaCIS.Application.Contracts.UserLoginDTO,ZiggyCreatures.Caching.Fusion.IFusionCache,IRaCIS.Application.Services.IUserService,IRaCIS.Core.Application.Auth.ITokenService,IRaCIS.Core.Application.Contracts.IReadingImageTaskService,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig},IRaCIS.Application.Services.IMailVerificationService)">
|
<member name="M:IRaCIS.Api.Controllers.ExtraController.Login(IRaCIS.Application.Contracts.UserLoginDTO,ZiggyCreatures.Caching.Fusion.IFusionCache,IRaCIS.Core.Application.Service.IUserService,IRaCIS.Core.Application.Auth.ITokenService,IRaCIS.Core.Application.Contracts.IReadingImageTaskService,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig},IRaCIS.Core.Application.Service.IMailVerificationService)">
|
||||||
<summary> 系统用户登录接口[New] </summary>
|
<summary> 系统用户登录接口[New] </summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.API.Controllers.Special.FinancialChangeController.AddOrUpdateTrialInspection(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Application.Contracts.TrialCommand})">
|
<member name="M:IRaCIS.Core.API.Controllers.Special.FinancialChangeController.AddOrUpdateTrialInspection(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Application.Contracts.TrialCommand})">
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<param name="param"></param>
|
<param name="param"></param>
|
||||||
<returns>新记录Id</returns>
|
<returns>新记录Id</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.API.Controllers.Special.FinancialChangeController.WorkLoadAddOrUpdate(IRaCIS.Application.Services.IDoctorWorkloadService,IRaCIS.Application.Contracts.WorkloadCommand)">
|
<member name="M:IRaCIS.Core.API.Controllers.Special.FinancialChangeController.WorkLoadAddOrUpdate(IRaCIS.Core.Application.Service.IDoctorWorkloadService,IRaCIS.Application.Contracts.WorkloadCommand)">
|
||||||
<summary>
|
<summary>
|
||||||
添加或更新工作量[AUTH]
|
添加或更新工作量[AUTH]
|
||||||
</summary>
|
</summary>
|
||||||
|
|
|
@ -10,7 +10,7 @@ using Panda.DynamicWebApi.Attributes;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using ZiggyCreatures.Caching.Fusion;
|
using ZiggyCreatures.Caching.Fusion;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
|
||||||
#pragma warning disable CS8618
|
#pragma warning disable CS8618
|
||||||
|
|
|
@ -3,14 +3,14 @@ using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.BusinessFilter
|
namespace IRaCIS.Core.Application.BusinessFilter;
|
||||||
{
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 不生效,不知道为啥
|
/// <summary>
|
||||||
/// </summary>
|
/// 不生效,不知道为啥
|
||||||
public class GlobalExceptionHandler : IExceptionHandler
|
/// </summary>
|
||||||
{
|
public class GlobalExceptionHandler : IExceptionHandler
|
||||||
|
{
|
||||||
private readonly ILogger<GlobalExceptionHandler> _logger;
|
private readonly ILogger<GlobalExceptionHandler> _logger;
|
||||||
public GlobalExceptionHandler(ILogger<GlobalExceptionHandler> logger)
|
public GlobalExceptionHandler(ILogger<GlobalExceptionHandler> logger)
|
||||||
{
|
{
|
||||||
|
@ -40,5 +40,4 @@ namespace IRaCIS.Core.Application.BusinessFilter
|
||||||
// return true to signal that this exception is handled
|
// return true to signal that this exception is handled
|
||||||
return ValueTask.FromResult(false);
|
return ValueTask.FromResult(false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,12 +4,12 @@ using Microsoft.Extensions.Localization;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Filter
|
namespace IRaCIS.Core.Application.Filter;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class ModelActionFilter : ActionFilterAttribute, IActionFilter
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public class ModelActionFilter : ActionFilterAttribute, IActionFilter
|
|
||||||
{
|
|
||||||
public IStringLocalizer _localizer;
|
public IStringLocalizer _localizer;
|
||||||
public ModelActionFilter(IStringLocalizer localizer)
|
public ModelActionFilter(IStringLocalizer localizer)
|
||||||
{
|
{
|
||||||
|
@ -31,6 +31,4 @@ namespace IRaCIS.Core.Application.Filter
|
||||||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["ModelAction_InvalidAPIParameter"] + JsonConvert.SerializeObject(validationErrors)));
|
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["ModelAction_InvalidAPIParameter"] + JsonConvert.SerializeObject(validationErrors)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,12 @@ using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Filter
|
namespace IRaCIS.Core.Application.Filter;
|
||||||
|
|
||||||
|
#region snippet_DisableFormValueModelBindingAttribute
|
||||||
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
|
||||||
|
public class DisableFormValueModelBindingAttribute : Attribute, IResourceFilter
|
||||||
{
|
{
|
||||||
#region snippet_DisableFormValueModelBindingAttribute
|
|
||||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
|
|
||||||
public class DisableFormValueModelBindingAttribute : Attribute, IResourceFilter
|
|
||||||
{
|
|
||||||
public void OnResourceExecuting(ResourceExecutingContext context)
|
public void OnResourceExecuting(ResourceExecutingContext context)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -22,6 +22,5 @@ namespace IRaCIS.Core.Application.Filter
|
||||||
public void OnResourceExecuted(ResourceExecutedContext context)
|
public void OnResourceExecuted(ResourceExecutedContext context)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
|
@ -5,10 +5,10 @@ using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using Microsoft.Extensions.Localization;
|
using Microsoft.Extensions.Localization;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Filter
|
namespace IRaCIS.Core.Application.Filter;
|
||||||
|
|
||||||
|
public class ProjectExceptionFilter : Attribute, IExceptionFilter
|
||||||
{
|
{
|
||||||
public class ProjectExceptionFilter : Attribute, IExceptionFilter
|
|
||||||
{
|
|
||||||
private readonly ILogger<ProjectExceptionFilter> _logger;
|
private readonly ILogger<ProjectExceptionFilter> _logger;
|
||||||
|
|
||||||
public IStringLocalizer _localizer;
|
public IStringLocalizer _localizer;
|
||||||
|
@ -72,5 +72,4 @@ namespace IRaCIS.Core.Application.Filter
|
||||||
//继续
|
//继续
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,13 +8,13 @@ using System.Text.RegularExpressions;
|
||||||
using ZiggyCreatures.Caching.Fusion;
|
using ZiggyCreatures.Caching.Fusion;
|
||||||
using static IRaCIS.Core.Domain.Share.StaticData;
|
using static IRaCIS.Core.Domain.Share.StaticData;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Filter
|
namespace IRaCIS.Core.Application.Filter;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 主要为了 处理项目结束 锁库,不允许操作
|
||||||
|
/// </summary>
|
||||||
|
public class TrialResourceFilter : Attribute, IAsyncResourceFilter
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 主要为了 处理项目结束 锁库,不允许操作
|
|
||||||
/// </summary>
|
|
||||||
public class TrialResourceFilter : Attribute, IAsyncResourceFilter
|
|
||||||
{
|
|
||||||
private readonly IUserInfo _userInfo;
|
private readonly IUserInfo _userInfo;
|
||||||
private readonly IFusionCache _fusionCache;
|
private readonly IFusionCache _fusionCache;
|
||||||
public IStringLocalizer _localizer;
|
public IStringLocalizer _localizer;
|
||||||
|
@ -176,6 +176,5 @@ namespace IRaCIS.Core.Application.Filter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,14 +3,14 @@ using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.BusinessFilter
|
namespace IRaCIS.Core.Application.Service.BusinessFilter;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 统一返回前端数据包装,之前在控制器包装,现在修改为动态Api 在ResultFilter这里包装,减少重复冗余代码
|
||||||
|
/// by zhouhang 2021.09.12 周末
|
||||||
|
/// </summary>
|
||||||
|
public class UnifiedApiResultFilter : Attribute, IAsyncResultFilter
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 统一返回前端数据包装,之前在控制器包装,现在修改为动态Api 在ResultFilter这里包装,减少重复冗余代码
|
|
||||||
/// by zhouhang 2021.09.12 周末
|
|
||||||
/// </summary>
|
|
||||||
public class UnifiedApiResultFilter : Attribute, IAsyncResultFilter
|
|
||||||
{
|
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
public UnifiedApiResultFilter(ILogger<UnifiedApiResultFilter> logger)
|
public UnifiedApiResultFilter(ILogger<UnifiedApiResultFilter> logger)
|
||||||
|
@ -119,5 +119,4 @@ namespace IRaCIS.Core.Application.Service.BusinessFilter
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
global using AutoMapper.QueryableExtensions;
|
global using AutoMapper.QueryableExtensions;
|
||||||
global using IRaCIS.Core.Application;
|
|
||||||
global using IRaCIS.Core.Application.Service;
|
global using IRaCIS.Core.Application.Service;
|
||||||
global using IRaCIS.Core.Domain.Models;
|
global using IRaCIS.Core.Domain.Models;
|
||||||
global using IRaCIS.Core.Infra.EFCore;
|
global using IRaCIS.Core.Infra.EFCore;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
namespace IRaCIS.Core.Application.Helper
|
namespace IRaCIS.Core.Application.Helper;
|
||||||
{
|
|
||||||
|
|
||||||
public static class CacheKeys
|
|
||||||
{
|
public static class CacheKeys
|
||||||
|
{
|
||||||
//项目缓存
|
//项目缓存
|
||||||
public static string Trial(string trialIdStr) => $"TrialId:{trialIdStr}";
|
public static string Trial(string trialIdStr) => $"TrialId:{trialIdStr}";
|
||||||
|
|
||||||
|
@ -49,10 +49,10 @@
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string StartRestTime(Guid userId) => $"{userId}StartRestTime";
|
public static string StartRestTime(Guid userId) => $"{userId}StartRestTime";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class CacheHelper
|
public static class CacheHelper
|
||||||
{
|
{
|
||||||
public static async Task<string?> GetTrialStatusAsync(Guid trialId, IRepository<Trial> _trialRepository)
|
public static async Task<string?> GetTrialStatusAsync(Guid trialId, IRepository<Trial> _trialRepository)
|
||||||
{
|
{
|
||||||
var statusStr = await _trialRepository.Where(t => t.Id == trialId, ignoreQueryFilters: true).Select(t => t.TrialStatusStr).FirstOrDefaultAsync();
|
var statusStr = await _trialRepository.Where(t => t.Id == trialId, ignoreQueryFilters: true).Select(t => t.TrialStatusStr).FirstOrDefaultAsync();
|
||||||
|
@ -66,5 +66,4 @@
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Helper
|
namespace IRaCIS.Core.Application.Helper;
|
||||||
|
|
||||||
|
public class FileConvertHelper
|
||||||
{
|
{
|
||||||
public class FileConvertHelper
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
static public void ConvertWordToPdf(string inputWordFilePath, string outputPdfDir)
|
static public void ConvertWordToPdf(string inputWordFilePath, string outputPdfDir)
|
||||||
|
@ -30,5 +30,4 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
using RestSharp;
|
using RestSharp;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Helper
|
namespace IRaCIS.Core.Application.Helper;
|
||||||
{
|
|
||||||
|
|
||||||
#region 对接模型
|
|
||||||
public class HolidayCalendar
|
#region 对接模型
|
||||||
{
|
public class HolidayCalendar
|
||||||
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Version { get; set; }
|
public string Version { get; set; }
|
||||||
public string Generated { get; set; }
|
public string Generated { get; set; }
|
||||||
|
@ -13,10 +13,10 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
public string Author { get; set; }
|
public string Author { get; set; }
|
||||||
public string URL { get; set; }
|
public string URL { get; set; }
|
||||||
public Dictionary<string, List<HolidayYear>> Years { get; set; }
|
public Dictionary<string, List<HolidayYear>> Years { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class HolidayYear
|
public class HolidayYear
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public DateTime StartDate { get; set; }
|
public DateTime StartDate { get; set; }
|
||||||
public DateTime EndDate { get; set; }
|
public DateTime EndDate { get; set; }
|
||||||
|
@ -24,14 +24,14 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
public List<DateTime> CompDays { get; set; }
|
public List<DateTime> CompDays { get; set; }
|
||||||
public string URL { get; set; }
|
public string URL { get; set; }
|
||||||
public string Memo { get; set; }
|
public string Memo { get; set; }
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class HolidayHelper
|
public class HolidayHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// github 链接:https://github.com/lanceliao/china-holiday-calender?tab=readme-ov-file
|
/// github 链接:https://github.com/lanceliao/china-holiday-calender?tab=readme-ov-file
|
||||||
/// 接口请求参考文档:https://www.koudingke.cn/docs/zh-Hans/net-lib-docs/latest/RestSharp/Usage/Usage
|
/// 接口请求参考文档:https://www.koudingke.cn/docs/zh-Hans/net-lib-docs/latest/RestSharp/Usage/Usage
|
||||||
|
@ -102,5 +102,4 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
namespace IRaCIS.Core.Application.Helper
|
namespace IRaCIS.Core.Application.Helper;
|
||||||
|
|
||||||
|
public static class IRCEmailPasswordHelper
|
||||||
{
|
{
|
||||||
public static class IRCEmailPasswordHelper
|
|
||||||
{
|
|
||||||
private static readonly Random Random = new Random();
|
private static readonly Random Random = new Random();
|
||||||
|
|
||||||
//显示位数:3分之2的位数,向上取整
|
//显示位数:3分之2的位数,向上取整
|
||||||
|
@ -74,5 +74,4 @@
|
||||||
// 随机打乱密码字符顺序
|
// 随机打乱密码字符顺序
|
||||||
return new string(password.OrderBy(_ => Random.Next()).ToArray());
|
return new string(password.OrderBy(_ => Random.Next()).ToArray());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@ using Microsoft.Extensions.Configuration;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Helper
|
namespace IRaCIS.Core.Application.Helper;
|
||||||
|
|
||||||
|
public static class InternationalizationHelper
|
||||||
{
|
{
|
||||||
public static class InternationalizationHelper
|
|
||||||
{
|
|
||||||
public static string JsonFileFolder = Path.Combine(AppContext.BaseDirectory, StaticData.Folder.Resources);
|
public static string JsonFileFolder = Path.Combine(AppContext.BaseDirectory, StaticData.Folder.Resources);
|
||||||
|
|
||||||
public static FileSystemWatcher FileSystemWatcher_US { get; set; }
|
public static FileSystemWatcher FileSystemWatcher_US { get; set; }
|
||||||
|
@ -204,5 +204,4 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,20 +15,20 @@ using Minio.DataModel.Args;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Helper
|
namespace IRaCIS.Core.Application.Helper;
|
||||||
{
|
|
||||||
#region 绑定和返回模型
|
|
||||||
|
|
||||||
[LowerCamelCaseJson]
|
#region 绑定和返回模型
|
||||||
public class MinIOOptions : AWSOptions
|
|
||||||
{
|
[LowerCamelCaseJson]
|
||||||
|
public class MinIOOptions : AWSOptions
|
||||||
|
{
|
||||||
public int Port { get; set; }
|
public int Port { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class AWSOptions
|
public class AWSOptions
|
||||||
{
|
{
|
||||||
public string EndPoint { get; set; }
|
public string EndPoint { get; set; }
|
||||||
public bool UseSSL { get; set; }
|
public bool UseSSL { get; set; }
|
||||||
public string AccessKeyId { get; set; }
|
public string AccessKeyId { get; set; }
|
||||||
|
@ -38,10 +38,10 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
public string ViewEndpoint { get; set; }
|
public string ViewEndpoint { get; set; }
|
||||||
public int DurationSeconds { get; set; }
|
public int DurationSeconds { get; set; }
|
||||||
public string Region { get; set; }
|
public string Region { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AliyunOSSOptions
|
public class AliyunOSSOptions
|
||||||
{
|
{
|
||||||
public string RegionId { get; set; }
|
public string RegionId { get; set; }
|
||||||
public string AccessKeyId { get; set; }
|
public string AccessKeyId { get; set; }
|
||||||
public string AccessKeySecret { get; set; }
|
public string AccessKeySecret { get; set; }
|
||||||
|
@ -61,10 +61,10 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ObjectStoreServiceOptions
|
public class ObjectStoreServiceOptions
|
||||||
{
|
{
|
||||||
public string ObjectStoreUse { get; set; }
|
public string ObjectStoreUse { get; set; }
|
||||||
|
|
||||||
public AliyunOSSOptions AliyunOSS { get; set; }
|
public AliyunOSSOptions AliyunOSS { get; set; }
|
||||||
|
@ -74,10 +74,10 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
|
|
||||||
public AWSOptions AWS { get; set; }
|
public AWSOptions AWS { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ObjectStoreDTO
|
public class ObjectStoreDTO
|
||||||
{
|
{
|
||||||
public string ObjectStoreUse { get; set; }
|
public string ObjectStoreUse { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
@ -87,11 +87,11 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
|
|
||||||
public AWSTempToken AWS { get; set; }
|
public AWSTempToken AWS { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[LowerCamelCaseJson]
|
[LowerCamelCaseJson]
|
||||||
public class AliyunOSSTempToken
|
public class AliyunOSSTempToken
|
||||||
{
|
{
|
||||||
public string AccessKeyId { get; set; }
|
public string AccessKeyId { get; set; }
|
||||||
public string AccessKeySecret { get; set; }
|
public string AccessKeySecret { get; set; }
|
||||||
|
|
||||||
|
@ -106,11 +106,11 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
public DateTime Expiration { get; set; }
|
public DateTime Expiration { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[LowerCamelCaseJson]
|
[LowerCamelCaseJson]
|
||||||
public class AWSTempToken
|
public class AWSTempToken
|
||||||
{
|
{
|
||||||
public string Region { get; set; }
|
public string Region { get; set; }
|
||||||
public string SessionToken { get; set; }
|
public string SessionToken { get; set; }
|
||||||
public string EndPoint { get; set; }
|
public string EndPoint { get; set; }
|
||||||
|
@ -119,21 +119,21 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
public string BucketName { get; set; }
|
public string BucketName { get; set; }
|
||||||
public string ViewEndpoint { get; set; }
|
public string ViewEndpoint { get; set; }
|
||||||
public DateTime Expiration { get; set; }
|
public DateTime Expiration { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ObjectStoreUse
|
public enum ObjectStoreUse
|
||||||
{
|
{
|
||||||
AliyunOSS = 0,
|
AliyunOSS = 0,
|
||||||
MinIO = 1,
|
MinIO = 1,
|
||||||
AWS = 2,
|
AWS = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// aws 参考链接 https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv3/S3/S3_Basics
|
// aws 参考链接 https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv3/S3/S3_Basics
|
||||||
|
|
||||||
public interface IOSSService
|
public interface IOSSService
|
||||||
{
|
{
|
||||||
public Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName, bool isFileNameAddGuid = true);
|
public Task<string> UploadToOSSAsync(Stream fileStream, string oosFolderPath, string fileRealName, bool isFileNameAddGuid = true);
|
||||||
public Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath, bool isFileNameAddGuid = true);
|
public Task<string> UploadToOSSAsync(string localFilePath, string oosFolderPath, bool isFileNameAddGuid = true);
|
||||||
|
|
||||||
|
@ -146,11 +146,11 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
public Task DeleteFromPrefix(string prefix);
|
public Task DeleteFromPrefix(string prefix);
|
||||||
|
|
||||||
public Task<ObjectStoreDTO> GetObjectStoreTempToken();
|
public Task<ObjectStoreDTO> GetObjectStoreTempToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class OSSService : IOSSService
|
public class OSSService : IOSSService
|
||||||
{
|
{
|
||||||
public ObjectStoreServiceOptions ObjectStoreServiceOptions { get; set; }
|
public ObjectStoreServiceOptions ObjectStoreServiceOptions { get; set; }
|
||||||
|
|
||||||
private AliyunOSSTempToken AliyunOSSTempToken { get; set; }
|
private AliyunOSSTempToken AliyunOSSTempToken { get; set; }
|
||||||
|
@ -758,7 +758,4 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,13 +4,13 @@ using System.Globalization;
|
||||||
using Xceed.Document.NET;
|
using Xceed.Document.NET;
|
||||||
using Xceed.Words.NET;
|
using Xceed.Words.NET;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Helper
|
namespace IRaCIS.Core.Application.Helper;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 利用DocX 库 处理word国际化模板
|
||||||
|
/// </summary>
|
||||||
|
public static class WordTempleteHelper
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 利用DocX 库 处理word国际化模板
|
|
||||||
/// </summary>
|
|
||||||
public static class WordTempleteHelper
|
|
||||||
{
|
|
||||||
public static void DocX_GetInternationalTempleteStream(string filePath, Stream memoryStream)
|
public static void DocX_GetInternationalTempleteStream(string filePath, Stream memoryStream)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -92,5 +92,4 @@ namespace IRaCIS.Core.Application.Helper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue