This commit is contained in:
2024-10-16 20:46:46 +08:00
parent fdfdbb5ff6
commit 185b8aef90
14 changed files with 546 additions and 306 deletions

View File

@@ -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),