|
|
@@ -337,7 +337,7 @@ func RefreshUserStaticAllTabel() { |
|
|
|
|
|
|
|
statictisSess := xStatistic.NewSession() |
|
|
|
defer statictisSess.Close() |
|
|
|
|
|
|
|
log.Info("delete all data from table: user_business_analysis_all") |
|
|
|
statictisSess.Exec("delete from user_business_analysis_all") |
|
|
|
|
|
|
|
currentTimeNow := time.Now() |
|
|
@@ -356,6 +356,7 @@ func RefreshUserStaticAllTabel() { |
|
|
|
Find(&userBusinessAnalysisList); err != nil { |
|
|
|
return |
|
|
|
} |
|
|
|
log.Info("query all data from table: user_business_analysis,len=" + fmt.Sprint(len(userBusinessAnalysisList))) |
|
|
|
for _, userRecord := range userBusinessAnalysisList { |
|
|
|
log.Info("insert to UserBusinessAnalysisAll table,user id=" + fmt.Sprint(userRecord.ID)) |
|
|
|
allData := getAllData(userRecord.ID, statictisSess) |
|
|
@@ -373,6 +374,7 @@ func RefreshUserStaticAllTabel() { |
|
|
|
log.Info("insert all data failed." + err.Error()) |
|
|
|
} |
|
|
|
} |
|
|
|
log.Info("refresh all data finished.") |
|
|
|
} |
|
|
|
|
|
|
|
func CounDataByDateAndReCount(wikiCountMap map[string]int, startTime time.Time, endTime time.Time, isReCount bool) error { |
|
|
|