优化结构
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
`service` adapts HTTP-facing DTOs to business usecases and owns application
|
||||
orchestration. Request/response/filter contracts live in `dto/`; the root
|
||||
package is a compatibility facade and module provider aggregator.
|
||||
package aggregates module provider sets for Wire.
|
||||
|
||||
Implementations are grouped by the same business modules as `biz` and `data`:
|
||||
|
||||
@@ -18,9 +18,8 @@ The stateless router-prefix helper lives in `internal/utils/routepath` because
|
||||
both service modules and HTTP middleware use it; it does not depend on a
|
||||
business usecase or DTO.
|
||||
|
||||
Each module owns its Wire `ProviderSet`. The root `service` package re-exports
|
||||
the existing service types and constructors through aliases and thin wrappers, so handlers, middleware
|
||||
and generated Wire code can migrate independently without a flag day.
|
||||
Each module owns its Wire `ProviderSet`; the root package only composes those
|
||||
sets and does not re-export service types or constructors.
|
||||
|
||||
Within `system/`, larger cross-cutting resources stay in the same package while
|
||||
being split by concern (`audit.go` and its error/log companions, `media.go` and
|
||||
|
||||
@@ -10,7 +10,7 @@ func convertAuthority(value system.Authority) *dto.AuthorityResponse {
|
||||
if value.Menus != nil {
|
||||
menus = menuResponses(value.Menus)
|
||||
}
|
||||
return &dto.AuthorityResponse{CreatedAt: value.CreatedAt, UpdatedAt: value.UpdatedAt, DeletedAt: value.DeletedAt, AuthorityID: value.AuthorityID, AuthorityName: value.AuthorityName, ParentID: value.ParentID, Children: nil, Menus: menus, DataScope: value.DataScope, DefaultRouter: value.DefaultRouter}
|
||||
return &dto.AuthorityResponse{CreatedAt: value.CreatedAt, UpdatedAt: value.UpdatedAt, AuthorityID: value.AuthorityID, AuthorityName: value.AuthorityName, ParentID: value.ParentID, Children: nil, Menus: menus, DataScope: value.DataScope, DefaultRouter: value.DefaultRouter}
|
||||
}
|
||||
func convertUser(user *system.User) *dto.UserResponse {
|
||||
var authorities []*dto.AuthorityResponse
|
||||
|
||||
Reference in New Issue
Block a user