Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/1036/head
zouap 3 years ago
parent
commit
778782ba9f
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      models/user_business_analysis.go

+ 3
- 1
models/user_business_analysis.go View File

@@ -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 {


Loading…
Cancel
Save