From 42e62da19ac4a1e426a9b60f3d1fb528cf9d3a68 Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 19 Apr 2024 09:47:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B4=BB=E8=B7=83=E5=A4=A9?= =?UTF-8?q?=E6=95=B0=E4=BD=8D=E7=BD=AE?= 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 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index e6c2e540c2..e191976dee 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -100,6 +100,7 @@ func getExcelHeader(ctx *context.Context) map[string]string { excelHeader = append(excelHeader, ctx.Tr("user.static.focusrepocount")) excelHeader = append(excelHeader, ctx.Tr("user.static.starrepocount")) excelHeader = append(excelHeader, ctx.Tr("user.static.logincount")) + excelHeader = append(excelHeader, ctx.Tr("user.static.loginactioncount")) excelHeader = append(excelHeader, ctx.Tr("user.static.watchedcount")) excelHeader = append(excelHeader, ctx.Tr("user.static.commitcodesize")) excelHeader = append(excelHeader, ctx.Tr("user.static.solveissuecount")) @@ -123,7 +124,6 @@ func getExcelHeader(ctx *context.Context) map[string]string { excelHeader = append(excelHeader, ctx.Tr("user.static.email")) excelHeader = append(excelHeader, ctx.Tr("user.static.phone")) excelHeader = append(excelHeader, ctx.Tr("user.static.location")) - excelHeader = append(excelHeader, ctx.Tr("user.static.loginactioncount")) excelHeader = append(excelHeader, ctx.Tr("user.static.registdate")) excelHeader = append(excelHeader, ctx.Tr("user.static.countdate")) @@ -166,6 +166,8 @@ func writeExcel(row int, xlsx *excelize.File, sheetName string, userRecord *mode tmp = tmp + 1 xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.LoginCount) tmp = tmp + 1 + xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.LoginActionCount) + tmp = tmp + 1 xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.WatchedCount) tmp = tmp + 1 xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.CommitCodeSize) @@ -212,9 +214,6 @@ func writeExcel(row int, xlsx *excelize.File, sheetName string, userRecord *mode xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.UserLocation) tmp = tmp + 1 - xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.LoginActionCount) - tmp = tmp + 1 - formatTime := userRecord.RegistDate.Format("2006-01-02 15:04:05") xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, formatTime[0:len(formatTime)-3]) tmp = tmp + 1 @@ -249,6 +248,8 @@ func writeExcelPage(row int, xlsx *excelize.File, sheetName string, userRecord * tmp = tmp + 1 xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.LoginCount) tmp = tmp + 1 + xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.LoginActionCount) + tmp = tmp + 1 xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.WatchedCount) tmp = tmp + 1 xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.CommitCodeSize) @@ -295,9 +296,6 @@ func writeExcelPage(row int, xlsx *excelize.File, sheetName string, userRecord * xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.UserLocation) tmp = tmp + 1 - xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, userRecord.LoginActionCount) - tmp = tmp + 1 - formatTime := userRecord.RegistDate.Format("2006-01-02 15:04:05") xlsx.SetCellValue(sheetName, getColumn(tmp)+rows, formatTime[0:len(formatTime)-3]) tmp = tmp + 1 -- 2.34.1