From f648f0982788e59d5d2d4c0766fc5e49fa29d330 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 23 May 2022 11:05:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/user_data_analysis.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index fa2d43589..4042955ec 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -575,9 +575,9 @@ func QueryUserStaticDataPage(ctx *context.Context) { re, count := models.QueryUserStaticDataPage(pageOpts) sheetName := ctx.Tr("user.static.sheetname") filename := sheetName + "_" + startDate + "_" + endDate + ".xlsx" - + os.Remove(setting.AppDataPath + Excel_File_Path + filename) go writeFileToDisk(ctx, count, re, filename) - ctx.Redirect("/api/v1/download_user_define_file?filename=" + filename) + ctx.JSON(http.StatusOK, filename) } else { mapInterface := make(map[string]interface{}) re, count := models.QueryUserStaticDataPage(pageOpts)