Browse Source

Merge pull request '#1065,重构用户分析All表的数据来源代码,该表的数据从每个原始表中获取,每天晚上更新一下。以解决已经存在的脏数据。' (#1074) from zouap_static into V20211213

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1074
Reviewed-by: lewis <747342561@qq.com>
pull/1090/head
lewis 3 years ago
parent
commit
edc36442b3
2 changed files with 556 additions and 321 deletions
  1. +553
    -312
      models/user_business_analysis.go
  2. +3
    -9
      routers/repo/user_data_analysis.go

+ 553
- 312
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) { func TimingCountDataByDateAndReCount(date string, isReCount bool) {


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

t, _ := time.Parse("2006-01-02", date) t, _ := time.Parse("2006-01-02", date)
startTime := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, t.Location()) 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()) log.Error("count user info error." + err.Error())
mailer.SendWarnNotifyMail(setting.Warn_Notify_Mails, warnEmailMessage) 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) { func TimingCountDataByDate(date string) {


Loading…
Cancel
Save