update ivyz5773
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
package svc
|
||||
|
||||
import (
|
||||
"github.com/zeromicro/go-queue/kq"
|
||||
"github.com/zeromicro/go-zero/core/stores/redis"
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"tianyuan-api/apps/api/internal/config"
|
||||
"tianyuan-api/apps/api/internal/middleware"
|
||||
"tianyuan-api/apps/api/internal/service"
|
||||
"tianyuan-api/apps/sentinel/sentinel"
|
||||
"tianyuan-api/apps/user/user"
|
||||
"time"
|
||||
|
||||
"github.com/zeromicro/go-queue/kq"
|
||||
"github.com/zeromicro/go-zero/core/stores/redis"
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
@@ -23,6 +24,7 @@ type ServiceContext struct {
|
||||
ProductRpc sentinel.ProductClient
|
||||
UserProductRpc sentinel.UserProductClient
|
||||
WestDexService *service.WestDexService
|
||||
YushanService *service.YushanService
|
||||
ApiRequestMqsService *service.ApiRequestMqsService
|
||||
}
|
||||
type ApiRequestMessage struct {
|
||||
@@ -61,5 +63,6 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
ApiMqsInterceptor: middleware.NewApiMqsInterceptorMiddleware(apiRequestMqsService).Handle,
|
||||
ApiRequestMqsService: apiRequestMqsService,
|
||||
WestDexService: service.NewWestDexService(c.WestConfig), // 假设你将密钥和 ID 配置在 config 中
|
||||
YushanService: service.NewYushanService(c.YushanConfig),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user