This commit is contained in:
2026-06-18 21:16:02 +08:00
parent 9685d34187
commit 3a5a0d0028
36 changed files with 1566 additions and 66 deletions

View File

@@ -683,6 +683,10 @@ func NewContainer() *Container {
api_repo.NewGormReportRepository,
fx.As(new(domain_api_repo.ReportRepository)),
),
fx.Annotate(
api_repo.NewGormQueryWhitelistRepository,
fx.As(new(domain_api_repo.QueryWhitelistRepository)),
),
),
// 下属账号仓储
@@ -803,10 +807,15 @@ func NewContainer() *Container {
// 使用带仓储注入的构造函数,支持企业报告记录持久化
api_services.NewApiRequestServiceWithRepos,
api_services.NewFormConfigService,
api_services.NewQueryWhitelistService,
),
// API域应用服务
fx.Provide(
fx.Annotate(
api_app.NewQueryWhitelistApplicationService,
fx.As(new(api_app.QueryWhitelistApplicationService)),
),
// API应用服务 - 绑定到接口
fx.Annotate(
func(
@@ -827,6 +836,7 @@ func NewContainer() *Container {
exportManager *export.ExportManager,
balanceAlertService finance_services.BalanceAlertService,
subordinateRepo domain_subordinate_repo.SubordinateRepository,
queryWhitelistSvc api_services.QueryWhitelistService,
) api_app.ApiApplicationService {
return api_app.NewApiApplicationService(
apiCallService,
@@ -846,6 +856,7 @@ func NewContainer() *Container {
exportManager,
balanceAlertService,
subordinateRepo,
queryWhitelistSvc,
)
},
fx.As(new(api_app.ApiApplicationService)),
@@ -1309,6 +1320,7 @@ func NewContainer() *Container {
handlers.NewStatisticsHandler,
// 管理员安全HTTP处理器
handlers.NewAdminSecurityHandler,
handlers.NewAdminQueryWhitelistHandler,
// 文章HTTP处理器
func(
appService article.ArticleApplicationService,
@@ -1403,6 +1415,7 @@ func NewContainer() *Container {
routes.NewStatisticsRoutes,
// 管理员安全路由
routes.NewAdminSecurityRoutes,
routes.NewAdminQueryWhitelistRoutes,
// PDFG路由
routes.NewPDFGRoutes,
// 企业报告页面路由
@@ -1523,6 +1536,7 @@ func RegisterRoutes(
apiRoutes *routes.ApiRoutes,
statisticsRoutes *routes.StatisticsRoutes,
adminSecurityRoutes *routes.AdminSecurityRoutes,
adminQueryWhitelistRoutes *routes.AdminQueryWhitelistRoutes,
pdfgRoutes *routes.PDFGRoutes,
qyglReportRoutes *routes.QYGLReportRoutes,
jwtAuth *middleware.JWTAuthMiddleware,
@@ -1551,6 +1565,7 @@ func RegisterRoutes(
announcementRoutes.Register(router)
statisticsRoutes.Register(router)
adminSecurityRoutes.Register(router)
adminQueryWhitelistRoutes.Register(router)
pdfgRoutes.Register(router)
qyglReportRoutes.Register(router)