feat: add Yuheng ticket bind, trial SMS off, shared bindings

Ship ticket-exchange and bind/policy for Z13, keep trial binds SMS-free, allow shared company bindings, and align SyncPage plus sync docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
whm
2026-08-05 15:09:49 +08:00
parent f90245db9c
commit d195aa4804
19 changed files with 957 additions and 96 deletions

View File

@@ -26,6 +26,7 @@ import (
"aijianzhan/platform/internal/storage"
"aijianzhan/platform/internal/tenantperm"
"aijianzhan/platform/internal/userstore"
"aijianzhan/platform/internal/yuhticket"
_ "github.com/lib/pq"
)
@@ -49,6 +50,7 @@ type ServiceContext struct {
JWT authx.JWTConfig
DBSync *dbsync.Manager
BindCodes bindcodestore.Store
YuhengJTI *yuhticket.JTIStore
TenantPerm tenantperm.Store
SMS *smsstore.Store
License *license.Manager
@@ -189,6 +191,11 @@ func NewServiceContext(c config.Config) *ServiceContext {
} else {
ctx.BindCodes = bc
}
if jti, err := yuhticket.NewJTIStore(dir); err != nil {
log.Printf("yuheng ticket jti: %v", err)
} else {
ctx.YuhengJTI = jti
}
}
}