Browse Source

重构用户分析所有数据表的逻辑

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.12.1^2
zouap 4 years ago
parent
commit
9606dee30a
2 changed files with 614 additions and 320 deletions
  1. +611
    -311
      models/user_business_analysis.go
  2. +3
    -9
      routers/repo/user_data_analysis.go

+ 611
- 311
models/user_business_analysis.go
File diff suppressed because it is too large
View File


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

@@ -148,11 +148,6 @@ func QueryUserStaticDataPage(ctx *context.Context) {

func TimingCountDataByDateAndReCount(date string, isReCount bool) {

if date == "refreshAll" {
models.RefreshUserStaticAllTabel()
return
}

t, _ := time.Parse("2006-01-02", date)
startTime := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, t.Location())

@@ -205,10 +200,9 @@ func TimingCountDataByDateAndReCount(date string, isReCount bool) {
log.Error("count user info error." + err.Error())
mailer.SendWarnNotifyMail(setting.Warn_Notify_Mails, warnEmailMessage)
}

if isReCount {
models.RefreshUserStaticAllTabel()
}
log.Info("start to count all user info data")
//models.RefreshUserStaticAllTabel(wikiMap)
log.Info("end to count all user info data")
}

func TimingCountDataByDate(date string) {


Loading…
Cancel
Save