From 6d5af298f184a7ddb1adf1af40727209576c4886 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Tue, 16 Nov 2021 16:45:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=95=B0=E6=8D=AE=E6=8E=92?= =?UTF-8?q?=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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/api/v1/repo/repo_dashbord.go b/routers/api/v1/repo/repo_dashbord.go index 2ecb39b9f..3a8e2a4ff 100644 --- a/routers/api/v1/repo/repo_dashbord.go +++ b/routers/api/v1/repo/repo_dashbord.go @@ -388,7 +388,7 @@ func GetProjectPeriodStatistics(ctx *context.Context) { func generateRadarSql(beginTime time.Time, endTime time.Time, repoId int64) string { sql := "SELECT date, impact, completeness, liveness, project_health, team_health, growth, radar_total 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) + " and created_unix<" + strconv.FormatInt(endTime.Unix(), 10) + " order by created_unix" return sql } @@ -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) + " and created_unix<" + strconv.FormatInt(endTime.Unix(), 10) + " order by created_unix" return sql }