优化结构

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
+7 -7
View File
@@ -2,18 +2,18 @@ package service
import (
"context"
"kra/internal/biz/system"
"kra/internal/biz"
"kra/internal/service/dto"
)
type AuthorityService struct{ uc *biz.AuthorityUsecase }
type AuthorityService struct{ uc *system.AuthorityUsecase }
func NewAuthorityService(uc *biz.AuthorityUsecase) *AuthorityService {
func NewAuthorityService(uc *system.AuthorityUsecase) *AuthorityService {
return &AuthorityService{uc: uc}
}
func authorityDTO(value *biz.Authority) *dto.AuthorityResponse {
func authorityDTO(value *system.Authority) *dto.AuthorityResponse {
out := convertAuthority(*value)
children := make([]*dto.AuthorityResponse, 0, len(value.Children))
for _, child := range value.Children {
@@ -23,11 +23,11 @@ func authorityDTO(value *biz.Authority) *dto.AuthorityResponse {
return out
}
func authorityDomain(req *dto.AuthorityRequest) *biz.Authority {
return &biz.Authority{AuthorityID: req.AuthorityID, AuthorityName: req.AuthorityName, ParentID: req.ParentID, DataScope: req.DataScope, DefaultRouter: req.DefaultRouter}
func authorityDomain(req *dto.AuthorityRequest) *system.Authority {
return &system.Authority{AuthorityID: req.AuthorityID, AuthorityName: req.AuthorityName, ParentID: req.ParentID, DataScope: req.DataScope, DefaultRouter: req.DefaultRouter}
}
func authorityResponse(value *biz.Authority) *dto.AuthorityResponse {
func authorityResponse(value *system.Authority) *dto.AuthorityResponse {
var menus []*dto.MenuResponse
if value.Menus != nil {
menus = menuResponses(value.Menus)