kra-new/internal/service
Yvan 509df03d61 优化结构 2026-08-29 08:40:15 +08:00
..
dto 优化结构 2026-08-29 02:58:00 +08:00
integration 优化结构 2026-08-28 15:37:40 +08:00
payment 优化结构 2026-08-29 08:40:15 +08:00
system 优化结构 2026-08-28 14:54:06 +08:00
task 优化结构 2026-08-28 09:19:54 +08:00
README.md 优化结构 2026-08-28 13:56:12 +08:00
service.go 优化结构 2026-08-28 00:29:40 +08:00

README.md

Service Layer

service adapts HTTP-facing DTOs to business usecases and owns application orchestration. Request/response/filter contracts live in dto/; the root package aggregates module provider sets for Wire.

Implementations are grouped by the same business modules as biz and data:

Directory Responsibility
system/ authentication, users, authorization, menus, organization, dictionaries, settings, audit, media, announcements, email, versions, exports
payment/ payment orchestration and callback handling
integration/ integration configuration orchestration
task/ scheduled task orchestration
dto/ HTTP request/response contracts

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 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 upload companion, and export.go/export_excel.go). New transport code should import the module package directly when it does not need the compatibility facade.