temp
This commit is contained in:
@@ -15,7 +15,11 @@ type ServiceContext struct {
|
||||
UserModel model.UsersModel // 用户表的模型
|
||||
EnterpriseModel model.EnterpriseInfoModel
|
||||
EnterpriseAuthModel model.EnterpriseAuthModel
|
||||
WalletsModel model.WalletsModel
|
||||
DeductionsModel model.DeductionsModel
|
||||
ApiRequestsModel model.ApiRequestsModel
|
||||
SecretRpc sentinel.SecretClient
|
||||
ProductRpc sentinel.ProductClient
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
@@ -34,6 +38,10 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
UserModel: model.NewUsersModel(db, c.CacheRedis), // 注入UserModel
|
||||
EnterpriseModel: model.NewEnterpriseInfoModel(db, c.CacheRedis),
|
||||
EnterpriseAuthModel: model.NewEnterpriseAuthModel(db, c.CacheRedis),
|
||||
WalletsModel: model.NewWalletsModel(db, c.CacheRedis),
|
||||
DeductionsModel: model.NewDeductionsModel(db, c.CacheRedis),
|
||||
ApiRequestsModel: model.NewApiRequestsModel(db, c.CacheRedis),
|
||||
SecretRpc: sentinel.NewSecretClient(zrpc.MustNewClient(c.SentinelRpc).Conn()),
|
||||
ProductRpc: sentinel.NewProductClient(zrpc.MustNewClient(c.SentinelRpc).Conn()),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user