feat: product number
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v4.25.8
|
||||
// - protoc v3.19.4
|
||||
// source: product/product.proto
|
||||
|
||||
package product
|
||||
@@ -32,6 +32,8 @@ const (
|
||||
Product_EditBase_FullMethodName = "/product.Product/EditBase"
|
||||
Product_EditSusceptible_FullMethodName = "/product.Product/EditSusceptible"
|
||||
Product_EditApplyPass_FullMethodName = "/product.Product/EditApplyPass"
|
||||
Product_Number_FullMethodName = "/product.Product/Number"
|
||||
Product_NumberAdd_FullMethodName = "/product.Product/NumberAdd"
|
||||
)
|
||||
|
||||
// ProductClient is the client API for Product service.
|
||||
@@ -58,6 +60,11 @@ type ProductClient interface {
|
||||
EditSusceptible(ctx context.Context, in *EditSusceptibleReq, opts ...grpc.CallOption) (*Response, error)
|
||||
// TODO: 临时接口,企微编辑申请审批对接后删除
|
||||
EditApplyPass(ctx context.Context, in *EditApplyPassReq, opts ...grpc.CallOption) (*Response, error)
|
||||
// 增减库存
|
||||
// type: 1 增加, 2 减少
|
||||
Number(ctx context.Context, in *NumberReq, opts ...grpc.CallOption) (*Response, error)
|
||||
// 增加库存
|
||||
NumberAdd(ctx context.Context, in *NumberAddReq, opts ...grpc.CallOption) (*Response, error)
|
||||
}
|
||||
|
||||
type productClient struct {
|
||||
@@ -198,6 +205,26 @@ func (c *productClient) EditApplyPass(ctx context.Context, in *EditApplyPassReq,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *productClient) Number(ctx context.Context, in *NumberReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Product_Number_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *productClient) NumberAdd(ctx context.Context, in *NumberAddReq, opts ...grpc.CallOption) (*Response, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(Response)
|
||||
err := c.cc.Invoke(ctx, Product_NumberAdd_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ProductServer is the server API for Product service.
|
||||
// All implementations must embed UnimplementedProductServer
|
||||
// for forward compatibility.
|
||||
@@ -222,6 +249,11 @@ type ProductServer interface {
|
||||
EditSusceptible(context.Context, *EditSusceptibleReq) (*Response, error)
|
||||
// TODO: 临时接口,企微编辑申请审批对接后删除
|
||||
EditApplyPass(context.Context, *EditApplyPassReq) (*Response, error)
|
||||
// 增减库存
|
||||
// type: 1 增加, 2 减少
|
||||
Number(context.Context, *NumberReq) (*Response, error)
|
||||
// 增加库存
|
||||
NumberAdd(context.Context, *NumberAddReq) (*Response, error)
|
||||
mustEmbedUnimplementedProductServer()
|
||||
}
|
||||
|
||||
@@ -271,6 +303,12 @@ func (UnimplementedProductServer) EditSusceptible(context.Context, *EditSuscepti
|
||||
func (UnimplementedProductServer) EditApplyPass(context.Context, *EditApplyPassReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method EditApplyPass not implemented")
|
||||
}
|
||||
func (UnimplementedProductServer) Number(context.Context, *NumberReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Number not implemented")
|
||||
}
|
||||
func (UnimplementedProductServer) NumberAdd(context.Context, *NumberAddReq) (*Response, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method NumberAdd not implemented")
|
||||
}
|
||||
func (UnimplementedProductServer) mustEmbedUnimplementedProductServer() {}
|
||||
func (UnimplementedProductServer) testEmbeddedByValue() {}
|
||||
|
||||
@@ -526,6 +564,42 @@ func _Product_EditApplyPass_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Product_Number_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(NumberReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ProductServer).Number(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Product_Number_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ProductServer).Number(ctx, req.(*NumberReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Product_NumberAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(NumberAddReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ProductServer).NumberAdd(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Product_NumberAdd_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ProductServer).NumberAdd(ctx, req.(*NumberAddReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Product_ServiceDesc is the grpc.ServiceDesc for Product service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -585,6 +659,14 @@ var Product_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "EditApplyPass",
|
||||
Handler: _Product_EditApplyPass_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Number",
|
||||
Handler: _Product_Number_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "NumberAdd",
|
||||
Handler: _Product_NumberAdd_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "product/product.proto",
|
||||
|
||||
Reference in New Issue
Block a user