This commit is contained in:
2026-02-27 15:46:12 +08:00
parent a8ec1a5aa1
commit 63269dcb0b
58 changed files with 5806 additions and 1766 deletions

View File

@@ -7,6 +7,7 @@ import (
admin_agent "bdqr-server/app/main/api/internal/handler/admin_agent"
admin_api "bdqr-server/app/main/api/internal/handler/admin_api"
admin_auth "bdqr-server/app/main/api/internal/handler/admin_auth"
admin_dashboard "bdqr-server/app/main/api/internal/handler/admin_dashboard"
admin_feature "bdqr-server/app/main/api/internal/handler/admin_feature"
admin_menu "bdqr-server/app/main/api/internal/handler/admin_menu"
admin_notification "bdqr-server/app/main/api/internal/handler/admin_notification"
@@ -172,6 +173,20 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
rest.WithPrefix("/api/v1/admin/auth"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
[]rest.Route{
{
Method: http.MethodGet,
Path: "/statistics",
Handler: admin_dashboard.AdminGetDashboardStatisticsHandler(serverCtx),
},
}...,
),
rest.WithPrefix("/api/v1/admin/dashboard"),
)
server.AddRoutes(
rest.WithMiddlewares(
[]rest.Middleware{serverCtx.AdminAuthInterceptor},
@@ -666,6 +681,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/level/privilege",
Handler: agent.GetLevelPrivilegeHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/order/agent",
Handler: agent.CheckOrderAgentHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/product_config",
@@ -731,6 +751,31 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
Path: "/upgrade/subordinate",
Handler: agent.UpgradeSubordinateHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/whitelist/check",
Handler: agent.CheckFeatureWhitelistStatusHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/whitelist/features",
Handler: agent.GetWhitelistFeaturesHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/whitelist/list",
Handler: agent.GetWhitelistListHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/whitelist/offline",
Handler: agent.OfflineFeatureHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/whitelist/order/create",
Handler: agent.CreateWhitelistOrderHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/withdrawal/apply",