|
|
@@ -245,7 +245,8 @@ func QueryUserStaticDataPage(opts *UserBusinessAnalysisQueryOptions) ([]*UserBus |
|
|
|
return userBusinessAnalysisReturnList, count |
|
|
|
} |
|
|
|
|
|
|
|
func CounDataByDate(wikiCountMap map[string]int, startTime time.Time, endTime time.Time) { |
|
|
|
func CounDataByDateAndReCount(wikiCountMap map[string]int, startTime time.Time, endTime time.Time, isReCount bool) { |
|
|
|
|
|
|
|
log.Info("start to count other user info data") |
|
|
|
sess := x.NewSession() |
|
|
|
defer sess.Close() |
|
|
@@ -263,8 +264,11 @@ func CounDataByDate(wikiCountMap map[string]int, startTime time.Time, endTime ti |
|
|
|
|
|
|
|
//endTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 0, 0, 0, currentTimeNow.Location()) |
|
|
|
end_unix := endTime.Unix() |
|
|
|
CountDate := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 1, 0, 0, currentTimeNow.Location()) |
|
|
|
if isReCount { |
|
|
|
CountDate = time.Date(startTime.Year(), startTime.Month(), startTime.Day(), 0, 1, 0, 0, startTime.Location()) |
|
|
|
} |
|
|
|
|
|
|
|
CountDate := time.Date(startTime.Year(), startTime.Month(), startTime.Day(), 0, 1, 0, 0, startTime.Location()) |
|
|
|
DataDate := startTime.Format("2006-01-02") |
|
|
|
CodeMergeCountMap := queryPullRequest(start_unix, end_unix) |
|
|
|
CommitCountMap := queryAction(start_unix, end_unix, 5) |
|
|
@@ -394,6 +398,10 @@ func CounDataByDate(wikiCountMap map[string]int, startTime time.Time, endTime ti |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
func CounDataByDate(wikiCountMap map[string]int, startTime time.Time, endTime time.Time) { |
|
|
|
CounDataByDateAndReCount(wikiCountMap, startTime, endTime, false) |
|
|
|
} |
|
|
|
|
|
|
|
func querySolveIssue(start_unix int64, end_unix int64) map[int64]int { |
|
|
|
//select issue_assignees.* from issue_assignees,issue where issue.is_closed=true and issue.id=issue_assignees.issue_id |
|
|
|
sess := x.NewSession() |
|
|
|