This commit is contained in:
2025-06-30 16:44:06 +08:00
parent 4186cd0caf
commit c8a81d0f49
840 changed files with 1389 additions and 403165 deletions

View File

@@ -21,8 +21,8 @@ import (
"management/internal/pkg/cache"
"management/internal/pkg/config"
"management/internal/pkg/render"
"management/internal/pkg/session"
"management/internal/pkg/sqldb"
"management/internal/pkg/token"
"management/internal/tasks"
"github.com/drhin/logger"
@@ -41,7 +41,7 @@ func Initialize(conf *config.Config, log *logger.Logger) (http.Handler, func(),
return nil, nil, err
}
sm, err := session.NewSCSManager(rd, conf)
token, err := token.NewPasetoMaker(conf.JWT.SigningKey)
if err != nil {
dbClose()
rdClose()
@@ -74,7 +74,7 @@ func Initialize(conf *config.Config, log *logger.Logger) (http.Handler, func(),
// =================================================================================================================
// service
service := v1.NewService(log, sm, redisCache)
service := v1.NewService(log, nil, redisCache)
loginLogService := system2.NewLoginLogService(service, loginLogRepository)
roleMenuService := system2.NewRoleMenuService(service, roleMenuRepository)
@@ -85,7 +85,7 @@ func Initialize(conf *config.Config, log *logger.Logger) (http.Handler, func(),
configService := system2.NewConfigService(service, configRepository)
captchaService := common.NewCaptchaService()
auditLogService := system2.NewAuditLogService(service, auditLogRepository)
authService := auth.NewAuth(log, rd, sm, userService, roleService, loginLogService)
authService := auth.NewAuth(log, rd, nil, userService, roleService, loginLogService)
// =================================================================================================================
// task
@@ -115,8 +115,8 @@ func Initialize(conf *config.Config, log *logger.Logger) (http.Handler, func(),
cfg := handler.Config{
Conf: conf,
Log: log,
Sm: sm,
Render: rdr,
Token: token,
TaskDistributor: taskDistributor,
CaptchaService: captchaService,
AuthService: authService,