refactor(ECR-001): 接入 ESS 并完成结构对齐 Phase A–E

绑定 ESS 双轨治理,拆分超大 H5 页与 Go 引擎,抽出 membership 服务,
并将 star/fortune 重命名为 outlook(JSON 双写兼容);同时修复 /psy API 代理与首页 + 菜单层级。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-05 17:51:40 +08:00
co-authored by Cursor
parent 583133dd09
commit 19d3cd5945
75 changed files with 4199 additions and 2505 deletions
+3 -1
View File
@@ -13,6 +13,7 @@ import (
"github.com/yuxingu/digital-psychology/apps/api/internal/service/ask"
companionsvc "github.com/yuxingu/digital-psychology/apps/api/internal/service/companion"
imagecardsvc "github.com/yuxingu/digital-psychology/apps/api/internal/service/imagecard"
"github.com/yuxingu/digital-psychology/apps/api/internal/service/membership"
"github.com/yuxingu/digital-psychology/apps/api/internal/service/profile"
"github.com/yuxingu/digital-psychology/apps/api/internal/service/relation"
"github.com/yuxingu/digital-psychology/apps/api/internal/service/report"
@@ -38,6 +39,7 @@ func NewRouter(pool *pgxpool.Pool, cfg config.Config) *gin.Engine {
Reports: reportRepo,
Invites: &repository.SynastryInviteRepo{Pool: pool},
}
membershipSvc := &membership.Service{Reports: reportRepo}
relationSvc := &relation.Service{Profiles: profileRepo, Reports: reportRepo, Relations: relationRepo}
scaleSvc := &scale.Service{Repo: &repository.ScaleRepo{Pool: pool}, Profiles: profileRepo}
askSvc := &ask.Service{Profiles: profileRepo, Reports: reportRepo, Ask: askRepo, LLM: llm}
@@ -64,7 +66,7 @@ func NewRouter(pool *pgxpool.Pool, cfg config.Config) *gin.Engine {
authed := api.Group("")
authed.Use(middleware.DeviceAuth(pool))
(&handler.ProfileHandler{Svc: profileSvc}).Register(authed)
(&handler.ReportHandler{Svc: reportSvc}).Register(authed)
(&handler.ReportHandler{Svc: reportSvc, Membership: membershipSvc}).Register(authed)
(&handler.SynastryHandler{Svc: reportSvc}).Register(authed)
(&handler.RelationHandler{Svc: relationSvc}).Register(authed)
(&handler.ScaleHandler{Svc: scaleSvc}).Register(authed)