Browse Source

项目数据排序

tags/v1.21.12.1
ychao_1983 4 years ago
parent
commit
6d5af298f1
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      routers/api/v1/repo/repo_dashbord.go

+ 2
- 2
routers/api/v1/repo/repo_dashbord.go View File

@@ -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
}


Loading…
Cancel
Save