1234567891011121314151617181920212223 |
- package svc
- import (
- "GtDataStore/app/cmd/organization/internal/config"
- "github.com/zeromicro/go-zero/core/stores/redis"
- )
- type ServiceContext struct {
- Config config.Config
- Cache *redis.Redis
- modelList
- }
- func NewServiceContext(c config.Config) *ServiceContext {
- svc := &ServiceContext{
- Config: c,
- Cache: c.Redis.NewRedis(),
- }
- initModel(svc)
- return svc
- }
|