优化结构

This commit is contained in:
Yvan
2026-08-22 12:13:16 +08:00
parent d987244d0e
commit b27a66e9d3
200 changed files with 1794 additions and 1715 deletions
+5 -6
View File
@@ -2,13 +2,12 @@ package service
import (
"context"
"kra/internal/biz"
"kra/internal/biz/system"
)
type AccessControlService struct{ uc *biz.AccessControlUsecase }
type AccessControlService struct{ uc *system.AccessControlUsecase }
func NewAccessControlService(uc *biz.AccessControlUsecase) *AccessControlService {
func NewAccessControlService(uc *system.AccessControlUsecase) *AccessControlService {
return &AccessControlService{uc: uc}
}
@@ -16,7 +15,7 @@ func (s *AccessControlService) Authorize(ctx context.Context, authorityID uint,
return s.uc.Authorize(ctx, authorityID, path, method)
}
func (s *AccessControlService) ResolveDataScope(ctx context.Context, authorityID, userID uint) (biz.DataScope, error) {
func (s *AccessControlService) ResolveDataScope(ctx context.Context, authorityID, userID uint) (system.DataScope, error) {
return s.uc.ResolveDataScope(ctx, authorityID, userID)
}
@@ -25,5 +24,5 @@ func (s *AccessControlService) ContextWithDataScope(ctx context.Context, authori
if err != nil {
return ctx, err
}
return biz.NewDataScopeContext(ctx, scope), nil
return system.NewDataScopeContext(ctx, scope), nil
}