|
|
|
@@ -49,13 +49,13 @@ func QueryUserStaticDataPage(ctx *context.Context) { |
|
|
|
startTime = time.Now() |
|
|
|
endTime = time.Now() |
|
|
|
} else { |
|
|
|
startTime, _ = time.Parse("2006-01-02", startDate) |
|
|
|
startTime, _ = time.ParseInLocation("2006-01-02", startDate, time.Local) |
|
|
|
settingStartTime, _ := time.Parse("2006-01-02", setting.RadarMap.RecordBeginTime) |
|
|
|
if startTime.Unix() < settingStartTime.Unix() { |
|
|
|
startTime = settingStartTime |
|
|
|
startDate = settingStartTime.Format("2006-01-02") |
|
|
|
} |
|
|
|
endTime, _ = time.Parse("2006-01-02", endDate) |
|
|
|
endTime, _ = time.ParseInLocation("2006-01-02", endDate, time.Local) |
|
|
|
endTime = endTime.AddDate(0, 0, 1) |
|
|
|
isAll = false |
|
|
|
log.Info("startTime=" + fmt.Sprint(startTime.Unix()) + " endDate=" + fmt.Sprint(endTime.Unix())) |
|
|
|
@@ -129,8 +129,12 @@ func QueryUserStaticDataPage(ctx *context.Context) { |
|
|
|
xlsx.SetCellValue(sheetName, "M"+rows, userRecord.EncyclopediasCount) |
|
|
|
xlsx.SetCellValue(sheetName, "N"+rows, userRecord.CreateRepoCount) |
|
|
|
xlsx.SetCellValue(sheetName, "O"+rows, fmt.Sprintf("%.2f", userRecord.OpenIIndex)) |
|
|
|
xlsx.SetCellValue(sheetName, "P"+rows, userRecord.RegistDate.Format("2006-01-02")) |
|
|
|
xlsx.SetCellValue(sheetName, "Q"+rows, time.Unix(userRecord.CountDate, 0).Format("2006-01-02")) |
|
|
|
|
|
|
|
formatTime := userRecord.RegistDate.Format("2006-01-02 15:04:05") |
|
|
|
xlsx.SetCellValue(sheetName, "P"+rows, formatTime[0:len(formatTime)-3]) |
|
|
|
|
|
|
|
formatTime = time.Unix(userRecord.CountDate, 0).Format("2006-01-02 15:04:05") |
|
|
|
xlsx.SetCellValue(sheetName, "Q"+rows, formatTime[0:len(formatTime)-3]) |
|
|
|
} |
|
|
|
|
|
|
|
//设置默认打开的表单 |
|
|
|
|