feat: sale info
This commit is contained in:
@@ -28,6 +28,7 @@ const (
|
||||
Sale_Create_FullMethodName = "/sale.Sale/Create"
|
||||
Sale_Edit_FullMethodName = "/sale.Sale/Edit"
|
||||
Sale_Info_FullMethodName = "/sale.Sale/Info"
|
||||
Sale_InfoInternal_FullMethodName = "/sale.Sale/InfoInternal"
|
||||
Sale_Items_FullMethodName = "/sale.Sale/Items"
|
||||
Sale_Status_FullMethodName = "/sale.Sale/Status"
|
||||
)
|
||||
@@ -47,6 +48,8 @@ type SaleClient interface {
|
||||
Create(ctx context.Context, in *CreateReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Edit(ctx context.Context, in *EditReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*Response, error)
|
||||
// 服务间调用:销售详情(含分组;mobile 脱敏,origin_mobile 为加密串)
|
||||
InfoInternal(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*InfoData, error)
|
||||
Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*Response, error)
|
||||
Status(ctx context.Context, in *StatusReq, opts ...grpc.CallOption) (*Response, error)
|
||||
}
|
||||
@@ -149,6 +152,16 @@ func (c *saleClient) Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOpt
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *saleClient) InfoInternal(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*InfoData, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(InfoData)
|
||||
err := c.cc.Invoke(ctx, Sale_InfoInternal_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *saleClient) Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
@@ -184,6 +197,8 @@ type SaleServer interface {
|
||||
Create(context.Context, *CreateReq) (*Response, error)
|
||||
Edit(context.Context, *EditReq) (*Response, error)
|
||||
Info(context.Context, *InfoReq) (*Response, error)
|
||||
// 服务间调用:销售详情(含分组;mobile 脱敏,origin_mobile 为加密串)
|
||||
InfoInternal(context.Context, *InfoReq) (*InfoData, error)
|
||||
Items(context.Context, *ItemsReq) (*Response, error)
|
||||
Status(context.Context, *StatusReq) (*Response, error)
|
||||
mustEmbedUnimplementedSaleServer()
|
||||
@@ -223,6 +238,9 @@ func (UnimplementedSaleServer) Edit(context.Context, *EditReq) (*Response, error
|
||||
func (UnimplementedSaleServer) Info(context.Context, *InfoReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Info not implemented")
|
||||
}
|
||||
func (UnimplementedSaleServer) InfoInternal(context.Context, *InfoReq) (*InfoData, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method InfoInternal not implemented")
|
||||
}
|
||||
func (UnimplementedSaleServer) Items(context.Context, *ItemsReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Items not implemented")
|
||||
}
|
||||
@@ -412,6 +430,24 @@ func _Sale_Info_Handler(srv interface{}, ctx context.Context, dec func(interface
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Sale_InfoInternal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(InfoReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(SaleServer).InfoInternal(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Sale_InfoInternal_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(SaleServer).InfoInternal(ctx, req.(*InfoReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Sale_Items_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ItemsReq)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -491,6 +527,10 @@ var Sale_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Info",
|
||||
Handler: _Sale_Info_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "InfoInternal",
|
||||
Handler: _Sale_InfoInternal_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Items",
|
||||
Handler: _Sale_Items_Handler,
|
||||
|
||||
Reference in New Issue
Block a user