feat: 添加争议微服务,支持订单争议流程
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package svc
|
||||
|
||||
import (
|
||||
"juwan-backend/app/dispute/api/internal/config"
|
||||
"juwan-backend/app/dispute/rpc/disputeservice"
|
||||
"juwan-backend/app/order/rpc/orderservice"
|
||||
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
DisputeRpc disputeservice.DisputeService
|
||||
OrderRpc orderservice.OrderService
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
DisputeRpc: disputeservice.NewDisputeService(zrpc.MustNewClient(c.DisputeRpcConf)),
|
||||
OrderRpc: orderservice.NewOrderService(zrpc.MustNewClient(c.OrderRpcConf)),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user