From 006cd65b629cb4d86b49334d4c751ec9a9c33df4 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Tue, 23 Nov 2021 09:38:38 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=AF=8F=E5=A4=A9=E7=9A=84=E5=A2=9E=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/api/v1/repo/repo_dashbord.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/api/v1/repo/repo_dashbord.go b/routers/api/v1/repo/repo_dashbord.go index 519077af2..8f7f03533 100644 --- a/routers/api/v1/repo/repo_dashbord.go +++ b/routers/api/v1/repo/repo_dashbord.go @@ -362,7 +362,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" + + sql := "SELECT date, num_visits,num_downloads_added as num_downloads,num_commits_added as 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 desc"