feat: chore test
This commit is contained in:
@@ -3,6 +3,7 @@ package logic
|
||||
import (
|
||||
"context"
|
||||
|
||||
order "lone-services/rpc/order/pb"
|
||||
"lone-services/services/order/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
@@ -12,6 +13,7 @@ type ItemsLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
BaseLogic
|
||||
}
|
||||
|
||||
func NewItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ItemsLogic {
|
||||
@@ -22,9 +24,17 @@ func NewItemsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ItemsLogic
|
||||
}
|
||||
}
|
||||
|
||||
func (l *ItemsLogic) Items(in *order.ItemsRequest) (*order.Response, error) {
|
||||
// todo: add your logic here and delete this line
|
||||
func (l *ItemsLogic) Items(in *order.OrderItemsRequest) (*order.Response, error) {
|
||||
//调用其它服务实例
|
||||
//cli, err := svc.GetRpcClient(l.svcCtx.ExpressSvcName)
|
||||
//if err != nil {
|
||||
// l.Logger.Errorf("get express rpc err: %v", err)
|
||||
// //降级逻辑
|
||||
// return l.out(utils.ErrorInternalServer, "express"+utils.ErrorInternalServer.Msg)
|
||||
//}
|
||||
//expClient := express.NewExpressClient(cli.Conn())
|
||||
//res, _ := expClient.Ping(context.Background(), &express.Request{})
|
||||
//l.Logger.Error("res: %v", res)
|
||||
|
||||
//TODO new id now
|
||||
return &order.Response{}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user