feat:搭建yi-abp tool框架

This commit is contained in:
橙子
2024-06-02 13:09:25 +08:00
parent daaa3513ae
commit cbc34ade78
35 changed files with 822 additions and 9 deletions

View File

@@ -15,10 +15,15 @@ namespace Yi.Framework.AspNetCore.Microsoft.AspNetCore.Middlewares
context.Response.OnStarting(() =>
{
if (context.Response.StatusCode == StatusCodes.Status200OK
&& context.Response.Headers["Content-Type"].ToString() == "application/vnd.ms-excel")
&& context.Response.Headers["Content-Type"].ToString() == "application/vnd.ms-excel")
{
context.FileAttachmentHandle($"{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx");
}
if (context.Response.StatusCode == StatusCodes.Status200OK &&
context.Response.Headers["Content-Type"].ToString() == "application/x-zip-compressed")
{
context.FileAttachmentHandle($"{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.zip");
}
return Task.CompletedTask;
});