Add the visit time feature.

This commit is contained in:
lishuang
2020-07-11 22:29:56 +08:00
parent da0e68f95c
commit 0d43439200
4 changed files with 65 additions and 53 deletions

View File

@ -54,11 +54,16 @@ func (this *DashboardService) Bootstrap() {
go core.RunWithRecovery(this.Etl)
}
// handle the dashboard data.
func (this *DashboardService) Etl() {
this.etlOneDay(util.Yesterday())
this.etlOneDay(time.Now())
}
startTime := util.FirstSecondOfDay(util.Yesterday())
endTime := util.LastSecondOfDay(util.Yesterday())
// handle the dashboard data.
func (this *DashboardService) etlOneDay(thenTime time.Time) {
startTime := util.FirstSecondOfDay(thenTime)
endTime := util.LastSecondOfDay(thenTime)
dt := util.ConvertTimeToDateString(startTime)
now := time.Now()
longTimeAgo := time.Now()