|
@@ -578,7 +578,7 @@ func queryUserRepoOpenIIndex(start_unix int64, end_unix int64) map[int64]float64 |
|
|
log.Info("query Repository size=" + fmt.Sprint(len(repoList))) |
|
|
log.Info("query Repository size=" + fmt.Sprint(len(repoList))) |
|
|
for _, repoRecord := range repoList { |
|
|
for _, repoRecord := range repoList { |
|
|
if _, ok := userMap[repoRecord.OwnerID]; !ok { |
|
|
if _, ok := userMap[repoRecord.OwnerID]; !ok { |
|
|
if _, ok := repoOpenIIndexMap[repoRecord.ID]; !ok { |
|
|
|
|
|
|
|
|
if _, ok := repoOpenIIndexMap[repoRecord.ID]; ok { |
|
|
userMap[repoRecord.OwnerID] = repoOpenIIndexMap[repoRecord.ID] |
|
|
userMap[repoRecord.OwnerID] = repoOpenIIndexMap[repoRecord.ID] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@@ -588,13 +588,16 @@ func queryUserRepoOpenIIndex(start_unix int64, end_unix int64) map[int64]float64 |
|
|
sess.Select("repo_id,user_id,mode").Table("collaboration") |
|
|
sess.Select("repo_id,user_id,mode").Table("collaboration") |
|
|
collaborationList := make([]*Collaboration, 0) |
|
|
collaborationList := make([]*Collaboration, 0) |
|
|
sess.Find(&collaborationList) |
|
|
sess.Find(&collaborationList) |
|
|
|
|
|
|
|
|
|
|
|
log.Info("query collaborationList size=" + fmt.Sprint(len(collaborationList))) |
|
|
|
|
|
|
|
|
for _, collaborationRecord := range collaborationList { |
|
|
for _, collaborationRecord := range collaborationList { |
|
|
if _, ok := userMap[collaborationRecord.UserID]; !ok { |
|
|
if _, ok := userMap[collaborationRecord.UserID]; !ok { |
|
|
if _, ok := repoOpenIIndexMap[collaborationRecord.RepoID]; !ok { |
|
|
|
|
|
|
|
|
if _, ok := repoOpenIIndexMap[collaborationRecord.RepoID]; ok { |
|
|
userMap[collaborationRecord.UserID] = repoOpenIIndexMap[collaborationRecord.RepoID] |
|
|
userMap[collaborationRecord.UserID] = repoOpenIIndexMap[collaborationRecord.RepoID] |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
if _, ok := repoOpenIIndexMap[collaborationRecord.RepoID]; !ok { |
|
|
|
|
|
|
|
|
if _, ok := repoOpenIIndexMap[collaborationRecord.RepoID]; ok { |
|
|
userMap[collaborationRecord.UserID] += repoOpenIIndexMap[collaborationRecord.RepoID] |
|
|
userMap[collaborationRecord.UserID] += repoOpenIIndexMap[collaborationRecord.RepoID] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|