Browse Source

Merge pull request '给前端返回总记录数' (#742) from fix-674 into V20211115

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/742
Reviewed-by: lewis <747342561@qq.com>
pull/745/head
lewis 3 years ago
parent
commit
113b384a22
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      routers/api/v1/repo/repo_dashbord.go

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

@@ -21,6 +21,7 @@ type ProjectsPeriodData struct {
LastUpdatedTime string `json:"lastUpdatedTime"`
PageSize int `json:"pageSize"`
TotalPage int `json:"totalPage"`
TotalCount int64 `json:"totalCount"`
PageRecords []*models.RepoStatistic `json:"pageRecords"`
}

@@ -107,6 +108,7 @@ func GetAllProjectsPeriodStatistics(ctx *context.Context) {
RecordBeginTime: recordBeginTime.Format(DATE_FORMAT),
PageSize: pageSize,
TotalPage: getTotalPage(total, pageSize),
TotalCount: total,
LastUpdatedTime: latestUpdatedTime,
PageRecords: models.GetRepoStatisticByRawSql(generatePageSql(beginTime, endTime, latestDate, q, orderBy, page, pageSize)),
}


Loading…
Cancel
Save