优化结构

This commit is contained in:
Yvan
2026-08-22 17:43:14 +08:00
parent 491ed21d48
commit 44ab14448a
14 changed files with 413 additions and 430 deletions
+4 -2
View File
@@ -2,8 +2,9 @@ package service
import (
"context"
"kra/internal/biz/system"
"kra/internal/biz/system"
"kra/internal/routecatalog"
"kra/internal/service/dto"
)
@@ -28,7 +29,8 @@ func (s *SystemConfigService) InitializeRoutes(ctx context.Context, input *dto.D
apis := make([]*system.API, 0, len(routes))
for _, route := range routes {
path := NormalizeRoutePath(route.Path, s.settings.RouterPrefix())
group, description := RouteMetadata(route.Method, path)
descriptor := routecatalog.Describe(route.Method, path)
group, description := descriptor.Group, descriptor.Description
apis = append(apis, &system.API{Path: path, Method: route.Method, APIGroup: group, Description: description})
}
return s.Initialize(ctx, input, apis)