new
This commit is contained in:
@@ -20,6 +20,7 @@ type ServiceContext struct {
|
||||
DeductionsModel model.DeductionsModel
|
||||
ApiRequestsModel model.ApiRequestsModel
|
||||
RechargeModel model.RechargeModel
|
||||
UserConfigModel model.UserConfigModel
|
||||
SecretRpc sentinel.SecretClient
|
||||
ProductRpc sentinel.ProductClient
|
||||
}
|
||||
@@ -56,6 +57,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
Config: c,
|
||||
Redis: rds, // 单独使用的 Redis 客户端
|
||||
UserModel: model.NewUsersModel(db, c.CacheRedis), // 注入UserModel
|
||||
UserConfigModel: model.NewUserConfigModel(db, c.CacheRedis),
|
||||
EnterpriseModel: model.NewEnterpriseInfoModel(db, c.CacheRedis),
|
||||
EnterpriseAuthModel: model.NewEnterpriseAuthModel(db, c.CacheRedis),
|
||||
WalletsModel: model.NewWalletsModel(db, c.CacheRedis),
|
||||
|
||||
Reference in New Issue
Block a user