😎调整文件夹名称为小写打头

This commit is contained in:
zuohuaijun 2024-08-11 00:10:46 +08:00
parent 939f82eac3
commit ac4265296a
5 changed files with 9 additions and 9 deletions

View File

@ -358,7 +358,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
};
// 模板目录
var templatePathList = GetTemplatePathList(input);
var templatePath = Path.Combine(App.WebHostEnvironment.WebRootPath, "Template");
var templatePath = Path.Combine(App.WebHostEnvironment.WebRootPath, "template");
for (var i = 0; i < templatePathList.Count; i++)
{
@ -425,7 +425,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
// 获取模板文件并替换
var templatePathList = GetTemplatePathList();
var templatePath = Path.Combine(App.WebHostEnvironment.WebRootPath, "Template");
var templatePath = Path.Combine(App.WebHostEnvironment.WebRootPath, "template");
var result = new Dictionary<string, string>();
for (var i = 0; i < templatePathList.Count; i++)

View File

@ -51,7 +51,7 @@ public class SysProcService : IDynamicApiController, ITransient
var dt = await db.Ado.UseStoredProcedure().GetDataTableAsync(input.ProcId, input.ProcParams);
var excelExporter = new ExcelExporter();
string template = AppDomain.CurrentDomain.BaseDirectory + "/wwwroot/Template/" + input.Template + ".xlsx";
string template = AppDomain.CurrentDomain.BaseDirectory + "/wwwroot/template/" + input.Template + ".xlsx";
var bs = await excelExporter.ExportBytesByTemplate(dt, template);
return new FileContentResult(bs, "application/octet-stream") { FileDownloadName = input.ProcId + ".xlsx" };
}

View File

@ -468,7 +468,7 @@ public class SysDatabaseService : IDynamicApiController, ITransient
/// <returns></returns>
private static string GetEntityTemplatePath()
{
var templatePath = Path.Combine(App.WebHostEnvironment.WebRootPath, "Template");
var templatePath = Path.Combine(App.WebHostEnvironment.WebRootPath, "template");
return Path.Combine(templatePath, "Entity.cs.vm");
}
@ -478,7 +478,7 @@ public class SysDatabaseService : IDynamicApiController, ITransient
/// <returns></returns>
private static string GetSeedDataTemplatePath()
{
var templatePath = Path.Combine(App.WebHostEnvironment.WebRootPath, "Template");
var templatePath = Path.Combine(App.WebHostEnvironment.WebRootPath, "template");
return Path.Combine(templatePath, "SeedData.cs.vm");
}

View File

@ -438,7 +438,7 @@ public class SysFileService : IDynamicApiController, ITransient
[DisplayName("上传头像")]
public async Task<SysFile> UploadAvatar([Required] IFormFile file)
{
var sysFile = await HandleUploadFile(file, "upload/Avatar", _imageType);
var sysFile = await HandleUploadFile(file, "upload/avatar", _imageType);
var sysUserRep = _sysFileRep.ChangeRepository<SqlSugarRepository<SysUser>>();
var user = sysUserRep.GetFirst(u => u.Id == _userManager.UserId);
@ -460,7 +460,7 @@ public class SysFileService : IDynamicApiController, ITransient
[DisplayName("上传电子签名")]
public async Task<SysFile> UploadSignature([Required] IFormFile file)
{
var sysFile = await HandleUploadFile(file, "upload/Signature", _imageType);
var sysFile = await HandleUploadFile(file, "upload/signature", _imageType);
var sysUserRep = _sysFileRep.ChangeRepository<SqlSugarRepository<SysUser>>();
var user = sysUserRep.GetFirst(u => u.Id == _userManager.UserId);

View File

@ -23,11 +23,11 @@
</ItemGroup>
<ItemGroup>
<Content Update="wwwroot\Avatar\**" CopyToPublishDirectory="Never" />
<Content Update="wwwroot\avatar\**" CopyToPublishDirectory="Never" />
</ItemGroup>
<ItemGroup>
<Content Update="wwwroot\Template\**">
<Content Update="wwwroot\template\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>