This commit is contained in:
2024-10-15 17:19:23 +08:00
parent 8f903b457f
commit c76451788c
42 changed files with 1600 additions and 237 deletions

View File

@@ -18,6 +18,7 @@ type ServiceContext struct {
WalletsModel model.WalletsModel
DeductionsModel model.DeductionsModel
ApiRequestsModel model.ApiRequestsModel
RechargeModel model.RechargeModel
SecretRpc sentinel.SecretClient
ProductRpc sentinel.ProductClient
}
@@ -41,6 +42,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
WalletsModel: model.NewWalletsModel(db, c.CacheRedis),
DeductionsModel: model.NewDeductionsModel(db, c.CacheRedis),
ApiRequestsModel: model.NewApiRequestsModel(db, c.CacheRedis),
RechargeModel: model.NewRechargeModel(db, c.CacheRedis),
SecretRpc: sentinel.NewSecretClient(zrpc.MustNewClient(c.SentinelRpc).Conn()),
ProductRpc: sentinel.NewProductClient(zrpc.MustNewClient(c.SentinelRpc).Conn()),
}