代码推送

This commit is contained in:
2026-09-09 02:39:57 +08:00
parent a112893947
commit 5e47757c73
24 changed files with 1156 additions and 226 deletions

View File

@@ -15,6 +15,7 @@ import (
"gotest/internal/config"
"gotest/internal/database"
"gotest/internal/geoip"
"gotest/internal/handler"
"gotest/internal/repository"
"gotest/internal/router"
@@ -88,9 +89,15 @@ func main() {
appHandler := handler.NewAppHandler(appService)
musicHandler := handler.NewMusicHandler(musicService)
dashboardHandler := handler.NewDashboardHandler(db.DB)
customerHandler := handler.NewCustomerHandler(cfg)
accessLogHandler := handler.NewAccessLogHandler(db.DB)
configHandler := handler.NewConfigHandler(db.DB)
// IP 归属地查询服务
ipLocationService := geoip.NewService()
// 8. 设置路由
r := router.Setup(cfg, db, authHandler, userHandler, adminHandler, uploadHandler, enterpriseHandler, shopHandler, foodHandler, gameHandler, appHandler, musicHandler, dashboardHandler)
r := router.Setup(cfg, db, authHandler, userHandler, adminHandler, uploadHandler, enterpriseHandler, shopHandler, foodHandler, gameHandler, appHandler, musicHandler, dashboardHandler, customerHandler, accessLogHandler, configHandler, ipLocationService)
// 9. 配置嵌入式前端:18 套网站模板
setupFrontend(r)