From 00ab65e720dbf76b421bcbb043d86a5ec4dc4a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= Date: Tue, 27 Sep 2022 19:30:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/UserController.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/UserController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/UserController.cs index bb96945d..4f1c4077 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/UserController.cs +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/UserController.cs @@ -67,8 +67,21 @@ namespace Yi.Framework.ApiMicroservice.Controllers } - - + /// + /// 导入数据 + /// + /// + [HttpGet] + [AllowAnonymous] + public async Task Import() + { + throw null; + //var users = await _iUserService._repository.GetListAsync(); + //var fileName = DateTime.Now.ToString("yyyyMMddHHmmssffff") + nameof(UserEntity) + PathConst.DataExport; + //var path = ExcelHelper.ExportExcel(users, fileName, Path.Combine(PathConst.wwwroot, PathEnum.Temp.ToString())); + //var file = System.IO.File.OpenRead(path); + //return File(file, "text/plain", $"{ fileName }.xlsx"); + } /// /// 动态条件分页查询