Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/953/head
zouap 3 years ago
parent
commit
daf4cf6ed9
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      routers/repo/user_data_analysis.go

+ 3
- 4
routers/repo/user_data_analysis.go View File

@@ -39,6 +39,7 @@ func QueryUserStaticDataPage(ctx *context.Context) {
endTime = time.Now()
} else {
startTime, _ = time.ParseInLocation("2006-01-02", startDate, time.Local)
startTime = time.Date(startTime.Year(), startTime.Month(), startTime.Day(), 12, 0, 0, 0, startTime.Location())
settingStartTime, _ := time.Parse("2006-01-02", setting.RadarMap.RecordBeginTime)
if startTime.Unix() < settingStartTime.Unix() {
startTime = settingStartTime
@@ -46,10 +47,8 @@ func QueryUserStaticDataPage(ctx *context.Context) {
}
endTime, _ = time.ParseInLocation("2006-01-02", endDate, time.Local)
endTime = endTime.AddDate(0, 0, 1)
if startDate == endDate {
startTime = startTime.AddDate(0, 0, 1)
endTime = endTime.AddDate(0, 0, 1)
}
endTime = time.Date(endTime.Year(), endTime.Month(), endTime.Day(), 23, 59, 59, 0, startTime.Location())

isAll = false
log.Info("startTime=" + fmt.Sprint(startTime.Unix()) + " endDate=" + fmt.Sprint(endTime.Unix()))
}


Loading…
Cancel
Save