优化结构

This commit is contained in:
Yvan
2026-08-28 00:29:40 +08:00
parent 04ff85116c
commit 03a4131f6e
118 changed files with 758 additions and 834 deletions
+6 -6
View File
@@ -9,21 +9,21 @@ import (
"strings"
"time"
"kra/internal/service"
"kra/internal/service/dto"
systemservice "kra/internal/service/system"
"github.com/gin-gonic/gin"
"github.com/mojocn/base64Captcha"
)
type Public struct {
auth *service.AuthService
system *service.SystemConfigService
settings *service.SecurityService
auth *systemservice.AuthService
system *systemservice.SystemConfigService
settings *systemservice.SecurityService
store *captchaStore
}
func NewPublic(auth *service.AuthService, system *service.SystemConfigService, settings *service.SecurityService) *Public {
func NewPublic(auth *systemservice.AuthService, system *systemservice.SystemConfigService, settings *systemservice.SecurityService) *Public {
return &Public{auth: auth, system: system, settings: settings, store: &captchaStore{service: settings}}
}
@@ -155,7 +155,7 @@ func (h *Public) InitializeDatabase(engine *gin.Engine) gin.HandlerFunc {
}
type captchaStore struct {
service *service.SecurityService
service *systemservice.SecurityService
}
func (s *captchaStore) Set(id, value string) error {