|
|
|
@@ -491,24 +491,31 @@ func getAllData(userId int64, statictisSess *xorm.Session) UserBusinessAnalysisA |
|
|
|
if err != nil { |
|
|
|
for i, row := range rows { |
|
|
|
log.Info("query user info, i=" + fmt.Sprint(i) + " code_merge_count=" + string(row["code_merge_count"])) |
|
|
|
dateRecord.CodeMergeCount = strconv.FormatInt(string(row["code_merge_count"]), 10) |
|
|
|
dateRecord.CommitCount = strconv.FormatInt(string(row["commit_count"]), 10) |
|
|
|
dateRecord.IssueCount = strconv.FormatInt(string(row["issue_count"]), 10) |
|
|
|
dateRecord.CommentCount = strconv.FormatInt(string(row["comment_count"]), 10) |
|
|
|
dateRecord.FocusRepoCount = strconv.FormatInt(string(row["focus_repo_count"]), 10) |
|
|
|
dateRecord.StarRepoCount = strconv.FormatInt(string(row["star_repo_count"]), 10) |
|
|
|
dateRecord.WatchedCount = strconv.FormatInt(string(row["watched_count"]), 10) |
|
|
|
dateRecord.CommitCodeSize = strconv.FormatInt(string(row["commit_code_size"]), 10) |
|
|
|
dateRecord.CommitDatasetSize = strconv.FormatInt(string(row["commit_dataset_size"]), 10) |
|
|
|
dateRecord.CommitModelCount = strconv.FormatInt(string(row["commit_model_count"]), 10) |
|
|
|
dateRecord.SolveIssueCount = strconv.FormatInt(string(row["solve_issue_count"]), 10) |
|
|
|
dateRecord.EncyclopediasCount = strconv.FormatInt(string(row["encyclopedias_count"]), 10) |
|
|
|
dateRecord.CreateRepoCount = strconv.FormatInt(string(row["create_repo_count"]), 10) |
|
|
|
dateRecord.LoginCount = strconv.FormatInt(string(row["login_count"]), 10) |
|
|
|
dateRecord.CodeMergeCount = getInt(string(row["code_merge_count"])) |
|
|
|
dateRecord.CommitCount = getInt(string(row["commit_count"])) |
|
|
|
dateRecord.IssueCount = getInt(string(row["issue_count"])) |
|
|
|
dateRecord.CommentCount = getInt(string(row["comment_count"])) |
|
|
|
dateRecord.FocusRepoCount = getInt(string(row["focus_repo_count"])) |
|
|
|
dateRecord.StarRepoCount = getInt(string(row["star_repo_count"])) |
|
|
|
dateRecord.WatchedCount = getInt(string(row["watched_count"])) |
|
|
|
dateRecord.CommitCodeSize = getInt(string(row["commit_code_size"])) |
|
|
|
dateRecord.CommitDatasetSize = getInt(string(row["commit_dataset_size"])) |
|
|
|
dateRecord.CommitModelCount = getInt(string(row["commit_model_count"])) |
|
|
|
dateRecord.SolveIssueCount = getInt(string(row["solve_issue_count"])) |
|
|
|
dateRecord.EncyclopediasCount = getInt(string(row["encyclopedias_count"])) |
|
|
|
dateRecord.CreateRepoCount = getInt(string(row["create_repo_count"])) |
|
|
|
dateRecord.LoginCount = getInt(string(row["login_count"])) |
|
|
|
} |
|
|
|
} |
|
|
|
return dateRecord |
|
|
|
} |
|
|
|
func getInt(str string) int { |
|
|
|
re, err := strconv.ParseInt(str, 10, 32) |
|
|
|
if err != nil { |
|
|
|
return 0 |
|
|
|
} |
|
|
|
return int(re) |
|
|
|
} |
|
|
|
|
|
|
|
func CounDataByDate(wikiCountMap map[string]int, startTime time.Time, endTime time.Time) { |
|
|
|
CounDataByDateAndReCount(wikiCountMap, startTime, endTime, false) |
|
|
|
|