2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 10:17:17 +08:00

feat: 首页ftp统计改为项目统计

This commit is contained in:
2026-01-24 01:37:25 +08:00
parent 13f06322dd
commit 4896f0f823
5 changed files with 20 additions and 17 deletions

View File

@@ -37,6 +37,14 @@ func NewProjectRepo(t *gotext.Locale, db *gorm.DB, log *slog.Logger) biz.Project
}
}
func (r *projectRepo) Count() (int64, error) {
var count int64
if err := r.db.Model(&biz.Project{}).Count(&count).Error; err != nil {
return 0, err
}
return count, nil
}
func (r *projectRepo) List(typ types.ProjectType, page, limit uint) ([]*types.ProjectDetail, int64, error) {
var projects []*biz.Project
var total int64

View File

@@ -126,7 +126,6 @@ func (r *websiteRepo) Count() (int64, error) {
if err := r.db.Model(&biz.Website{}).Count(&count).Error; err != nil {
return 0, err
}
return count, nil
}