优化结构

This commit is contained in:
Yvan
2026-08-28 10:51:19 +08:00
parent fec3820464
commit 5b17f47141
12 changed files with 63 additions and 31 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ func (r *apiRepo) FindAPI(ctx context.Context, id uint) (*system.API, error) {
}
return apiFromPO(po), nil
}
func (r *apiRepo) ListAPIs(ctx context.Context, page, size int, q *system.API) ([]*system.API, int64, error) {
func (r *apiRepo) ListAPIs(ctx context.Context, page, size int, q *system.APIFilter) ([]*system.API, int64, error) {
db := r.data.DB().WithContext(ctx).Model(&apiPO{})
if q != nil && q.StrictAll {
config := r.data.Runtime().Admin()
+1 -1
View File
@@ -152,7 +152,7 @@ func (r *exportRepo) FindExportTemplate(ctx context.Context, id uint, tid string
}
return exportFromPO(po, conditions, joins), nil
}
func (r *exportRepo) ListExportTemplates(ctx context.Context, page, size int, q *system.ExportTemplate) ([]*system.ExportTemplate, int64, error) {
func (r *exportRepo) ListExportTemplates(ctx context.Context, page, size int, q *system.ExportTemplateFilter) ([]*system.ExportTemplate, int64, error) {
db := r.data.DB().WithContext(ctx).Model(&exportTemplatePO{})
if q != nil {
if q.StartCreatedAt != nil && q.EndCreatedAt != nil {