同步
This commit is contained in:
@@ -29,20 +29,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
{
|
||||
return Result.Success().SetData(await _roleService.GetAllEntitiesTrueAsync());
|
||||
}
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetRoleFlie()
|
||||
{
|
||||
var roleList = await _roleService.GetAllEntitiesTrueAsync();
|
||||
Dictionary<string, string> dt = new();
|
||||
dt.Add("输出", "文件");
|
||||
var byteStream = Excel.ExportExcel(roleList.ToList(), dt).ToString();
|
||||
MemoryStream s = new MemoryStream();
|
||||
StreamWriter writer = new StreamWriter(s);
|
||||
writer.Write(byteStream);
|
||||
writer.Flush();
|
||||
//stream.Read(byteStream, 0, byteStream.Length);
|
||||
return new FileStreamResult(s, "application/vnd.ms-excel");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace Yi.Framework.ApiMicroservice
|
||||
#endregion
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env,IDbContextFactory _DbFactory, CacheClientDB _cacheClientDB)
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env,IDbContextFactory _DbFactory)
|
||||
{
|
||||
//if (env.IsDevelopment())
|
||||
{
|
||||
@@ -142,7 +142,7 @@ namespace Yi.Framework.ApiMicroservice
|
||||
//<2F><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>
|
||||
#endregion
|
||||
app.UseDbSeedInitService(_DbFactory);
|
||||
app.UseRedisInitService(_cacheClientDB);
|
||||
//app.UseRedisInitService(_cacheClientDB);
|
||||
#region
|
||||
//Endpointsע<73><D7A2>
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user