ws
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 32s
CI / admin (push) Successful in 22s
CI / bff (push) Successful in 19s
CI / chore (push) Successful in 18s
CI / equipment (push) Successful in 19s
CI / express (push) Successful in 18s
CI / factory (push) Successful in 17s
CI / message (push) Successful in 18s
CI / order (push) Successful in 17s
CI / payment (push) Successful in 17s
CI / percutaneous (push) Successful in 17s
CI / product (push) Successful in 17s
CI / record (push) Successful in 9m26s
CI / sale (push) Successful in 45s
CI / support (push) Successful in 3m8s
CI / task (push) Successful in 27s
CI / user (push) Successful in 21s
CI / wecom (push) Successful in 19s

This commit is contained in:
2026-10-08 16:37:33 +08:00
parent 6b8500ac5e
commit 0d8cfc695c
14 changed files with 272 additions and 393 deletions
@@ -72,10 +72,11 @@ func GetRpcClient(serviceName string) (zrpc.Client, error) {
}
type ServiceContext struct {
Config config.Config
DB *gorm.DB
Prefix string
UserName string
Config config.Config
DB *gorm.DB
Prefix string
UserName string
SessionMgr *utils.WsSessionManager
}
func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
@@ -86,9 +87,10 @@ func NewServiceContext(c config.Config, db *gorm.DB) *ServiceContext {
}
return &ServiceContext{
Config: c,
DB: db,
Prefix: utils.GetConfigString("mysql.prefix"),
UserName: UserSvc,
Config: c,
DB: db,
Prefix: utils.GetConfigString("mysql.prefix"),
UserName: UserSvc,
SessionMgr: utils.NewWsSessionManager(),
}
}