|
|
@@ -68,6 +68,8 @@ func countData() { |
|
|
|
sess.Find(&userList) |
|
|
|
|
|
|
|
currentTimeNow := time.Now() |
|
|
|
log.Info("current time:" + currentTimeNow.Format("2000-01-01 10:10:10")) |
|
|
|
|
|
|
|
yesterday := currentTimeNow.AddDate(0, 0, -1) |
|
|
|
startTime := time.Date(yesterday.Year(), yesterday.Month(), yesterday.Day(), 0, 0, 0, 0, yesterday.Location()) |
|
|
|
start_unix := startTime.Unix() |
|
|
@@ -76,6 +78,7 @@ func countData() { |
|
|
|
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()) |
|
|
|
//codeMergeCountMap := queryAction(start_unix,end_unix,11) |
|
|
|
|
|
|
|
CodeMergeCountMap := queryAction(start_unix, end_unix, 11) |
|
|
@@ -86,7 +89,7 @@ func countData() { |
|
|
|
var dateRecord UserBusinessAnalysis |
|
|
|
dateRecord.ID = userRecord.ID |
|
|
|
log.Info("i=" + fmt.Sprint(i) + " userName=" + userRecord.Name) |
|
|
|
dateRecord.CountDate = time.Now().Unix() |
|
|
|
dateRecord.CountDate = CountDate.Unix() |
|
|
|
dateRecord.Email = userRecord.Email |
|
|
|
dateRecord.RegistDate = userRecord.CreatedUnix |
|
|
|
|
|
|
|