优化结构

This commit is contained in:
Yvan
2026-08-23 02:36:58 +08:00
parent 7d89e2ea4d
commit 40632c5756
50 changed files with 408 additions and 115 deletions
+4 -3
View File
@@ -16,9 +16,10 @@
- `routecatalog`:统一声明 HTTP 路由的公开性、操作审计、请求体策略和 API 元数据
- `security`:后台 JWT 等安全实现
- `server`:Gin server 组合与生命周期;横切 HTTP 代码按子包维护:
`server/handler`、`server/middleware`、`server/router`、`server/httpx`
- `service`:应用服务、DTO 与领域对象转换;DTO 集中在
`service/dto`,根包中的 `dto_aliases.go` 只负责兼容旧调用方
`server/handler`、`server/middleware`、`server/router`、`server/staticfiles`;
通用响应和 Cookie 工具位于 `pkg/httpx`
- `service`:按 `system`、`payment`、`integration`、`task` 分模块的应用服务、
DTO 与领域对象转换;DTO 集中在 `service/dto`,根包是兼容旧调用方的类型/构造器门面
- `worker`:定时任务执行与调度
目录代表边界,模块文件按资源命名。DTO、handler、中间件、路由和 HTTP