From 5f5d249a53b3000fd6997cada300cd664f1c6772 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Tue, 16 Nov 2021 17:18:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E9=9C=80=E8=A6=81=EF=BC=8C?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=80=92=E5=BA=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 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 }