diff --git a/routers/api/v1/repo/repo_dashbord.go b/routers/api/v1/repo/repo_dashbord.go index 3a8e2a4ff..2becdd59f 100644 --- a/routers/api/v1/repo/repo_dashbord.go +++ b/routers/api/v1/repo/repo_dashbord.go @@ -396,7 +396,7 @@ func generateRadarSql(beginTime time.Time, endTime time.Time, repoId int64) stri func generateTargetSql(beginTime time.Time, endTime time.Time, repoId int64) string { sql := "SELECT date, num_visits,num_downloads,num_commits FROM repo_statistic" + " where repo_id=" + strconv.FormatInt(repoId, 10) + " and created_unix >=" + strconv.FormatInt(beginTime.Unix(), 10) + - " and created_unix<" + strconv.FormatInt(endTime.Unix(), 10) + " order by created_unix" + " and created_unix<" + strconv.FormatInt(endTime.Unix(), 10) + " order by created_unix desc" return sql }