😎调整文件夹名称为小写打头
This commit is contained in:
parent
939f82eac3
commit
ac4265296a
@ -358,7 +358,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
|
|||||||
};
|
};
|
||||||
// 模板目录
|
// 模板目录
|
||||||
var templatePathList = GetTemplatePathList(input);
|
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++)
|
for (var i = 0; i < templatePathList.Count; i++)
|
||||||
{
|
{
|
||||||
@ -425,7 +425,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
|
|||||||
|
|
||||||
// 获取模板文件并替换
|
// 获取模板文件并替换
|
||||||
var templatePathList = GetTemplatePathList();
|
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>();
|
var result = new Dictionary<string, string>();
|
||||||
for (var i = 0; i < templatePathList.Count; i++)
|
for (var i = 0; i < templatePathList.Count; i++)
|
||||||
|
|||||||
@ -51,7 +51,7 @@ public class SysProcService : IDynamicApiController, ITransient
|
|||||||
var dt = await db.Ado.UseStoredProcedure().GetDataTableAsync(input.ProcId, input.ProcParams);
|
var dt = await db.Ado.UseStoredProcedure().GetDataTableAsync(input.ProcId, input.ProcParams);
|
||||||
|
|
||||||
var excelExporter = new ExcelExporter();
|
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);
|
var bs = await excelExporter.ExportBytesByTemplate(dt, template);
|
||||||
return new FileContentResult(bs, "application/octet-stream") { FileDownloadName = input.ProcId + ".xlsx" };
|
return new FileContentResult(bs, "application/octet-stream") { FileDownloadName = input.ProcId + ".xlsx" };
|
||||||
}
|
}
|
||||||
|
|||||||
@ -468,7 +468,7 @@ public class SysDatabaseService : IDynamicApiController, ITransient
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private static string GetEntityTemplatePath()
|
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");
|
return Path.Combine(templatePath, "Entity.cs.vm");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -478,7 +478,7 @@ public class SysDatabaseService : IDynamicApiController, ITransient
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private static string GetSeedDataTemplatePath()
|
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");
|
return Path.Combine(templatePath, "SeedData.cs.vm");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -438,7 +438,7 @@ public class SysFileService : IDynamicApiController, ITransient
|
|||||||
[DisplayName("上传头像")]
|
[DisplayName("上传头像")]
|
||||||
public async Task<SysFile> UploadAvatar([Required] IFormFile file)
|
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 sysUserRep = _sysFileRep.ChangeRepository<SqlSugarRepository<SysUser>>();
|
||||||
var user = sysUserRep.GetFirst(u => u.Id == _userManager.UserId);
|
var user = sysUserRep.GetFirst(u => u.Id == _userManager.UserId);
|
||||||
@ -460,7 +460,7 @@ public class SysFileService : IDynamicApiController, ITransient
|
|||||||
[DisplayName("上传电子签名")]
|
[DisplayName("上传电子签名")]
|
||||||
public async Task<SysFile> UploadSignature([Required] IFormFile file)
|
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 sysUserRep = _sysFileRep.ChangeRepository<SqlSugarRepository<SysUser>>();
|
||||||
var user = sysUserRep.GetFirst(u => u.Id == _userManager.UserId);
|
var user = sysUserRep.GetFirst(u => u.Id == _userManager.UserId);
|
||||||
|
|||||||
@ -23,11 +23,11 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Update="wwwroot\Avatar\**" CopyToPublishDirectory="Never" />
|
<Content Update="wwwroot\avatar\**" CopyToPublishDirectory="Never" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Update="wwwroot\Template\**">
|
<Content Update="wwwroot\template\**">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user